Search
lxdream.org :: lxdream :: r677:3ee62740ff8f
lxdream 0.9.1
released Jun 29
Download Now
changeset677:3ee62740ff8f
parent676:705a5707da13
child678:35eb00945316
authornkeynes
dateThu May 29 10:50:25 2008 +0000 (11 years ago)
Remove pvr2mmio.h include from pvr2.h (it's supposed to be moore or less private)
Move redraw function from driver into pvr2_redraw_display()
src/drivers/video_gtk.c
src/pvr2/glrender.c
src/pvr2/pvr2.c
src/pvr2/pvr2.h
src/pvr2/rendbkg.c
src/pvr2/rendsave.c
src/pvr2/scene.c
src/pvr2/tacore.c
src/pvr2/texcache.c
src/pvr2/yuv.c
1.1 --- a/src/drivers/video_gtk.c Tue May 27 23:59:54 2008 +0000
1.2 +++ b/src/drivers/video_gtk.c Thu May 29 10:50:25 2008 +0000
1.3 @@ -19,6 +19,7 @@
1.4
1.5 #include <gdk/gdkkeysyms.h>
1.6 #include <stdint.h>
1.7 +#include <stdlib.h>
1.8 #include "lxdream.h"
1.9 #include "display.h"
1.10 #include "dckeysyms.h"
1.11 @@ -142,12 +143,7 @@
1.12
1.13 gboolean video_gtk_expose_callback(GtkWidget *widget, GdkEventExpose *event, gpointer data )
1.14 {
1.15 - render_buffer_t buffer = pvr2_get_front_buffer();
1.16 - if( buffer == NULL ) {
1.17 - display_gtk_driver.display_blank(pvr2_get_border_colour());
1.18 - } else {
1.19 - display_gtk_driver.display_render_buffer(buffer);
1.20 - }
1.21 + pvr2_redraw_display();
1.22 return TRUE;
1.23 }
1.24
1.25 @@ -155,7 +151,7 @@
1.26 {
1.27 video_width = event->width;
1.28 video_height = event->height;
1.29 - video_gtk_expose_callback(widget, NULL, data);
1.30 + pvr2_redraw_display();
1.31 return TRUE;
1.32 }
1.33
2.1 --- a/src/pvr2/glrender.c Tue May 27 23:59:54 2008 +0000
2.2 +++ b/src/pvr2/glrender.c Thu May 29 10:50:25 2008 +0000
2.3 @@ -20,6 +20,7 @@
2.4 #include <sys/time.h>
2.5 #include "display.h"
2.6 #include "pvr2/pvr2.h"
2.7 +#include "pvr2/pvr2mmio.h"
2.8 #include "pvr2/scene.h"
2.9 #include "pvr2/glutil.h"
2.10
3.1 --- a/src/pvr2/pvr2.c Tue May 27 23:59:54 2008 +0000
3.2 +++ b/src/pvr2/pvr2.c Thu May 29 10:50:25 2008 +0000
3.3 @@ -25,6 +25,7 @@
3.4 #include "asic.h"
3.5 #include "clock.h"
3.6 #include "pvr2/pvr2.h"
3.7 +#include "pvr2/pvr2mmio.h"
3.8 #include "pvr2/scene.h"
3.9 #include "sh4/sh4.h"
3.10 #define MMIO_IMPL
3.11 @@ -339,14 +340,15 @@
3.12 return pvr2_state.frame_count;
3.13 }
3.14
3.15 -render_buffer_t pvr2_get_front_buffer()
3.16 +void pvr2_redraw_display()
3.17 {
3.18 - return displayed_render_buffer;
3.19 -}
3.20 -
3.21 -uint32_t pvr2_get_border_colour()
3.22 -{
3.23 - return displayed_border_colour;
3.24 + if( display_driver != NULL ) {
3.25 + if( displayed_render_buffer == NULL ) {
3.26 + display_driver->display_blank(displayed_border_colour);
3.27 + } else {
3.28 + display_driver->display_render_buffer(displayed_render_buffer);
3.29 + }
3.30 + }
3.31 }
3.32
3.33 gboolean pvr2_save_next_scene( const gchar *filename )
4.1 --- a/src/pvr2/pvr2.h Tue May 27 23:59:54 2008 +0000
4.2 +++ b/src/pvr2/pvr2.h Thu May 29 10:50:25 2008 +0000
4.3 @@ -23,7 +23,6 @@
4.4 #include "lxdream.h"
4.5 #include "mem.h"
4.6 #include "display.h"
4.7 -#include "pvr2/pvr2mmio.h"
4.8
4.9 typedef unsigned int pvraddr_t;
4.10 typedef unsigned int pvr64addr_t;
4.11 @@ -69,8 +68,7 @@
4.12 void pvr2_next_frame( void );
4.13 void pvr2_set_base_address( uint32_t );
4.14 int pvr2_get_frame_count( void );
4.15 -render_buffer_t pvr2_get_front_buffer();
4.16 -uint32_t pvr2_get_border_colour();
4.17 +void pvr2_redraw_display();
4.18 gboolean pvr2_save_next_scene( const gchar *filename );
4.19
4.20 #define PVR2_CMD_END_OF_LIST 0x00
5.1 --- a/src/pvr2/rendbkg.c Tue May 27 23:59:54 2008 +0000
5.2 +++ b/src/pvr2/rendbkg.c Thu May 29 10:50:25 2008 +0000
5.3 @@ -37,6 +37,7 @@
5.4 #include <sys/time.h>
5.5 #include "display.h"
5.6 #include "pvr2/pvr2.h"
5.7 +#include "pvr2/pvr2mmio.h"
5.8 #include <math.h>
5.9
5.10 #define MAX_CLAMP_LINES 8
6.1 --- a/src/pvr2/rendsave.c Tue May 27 23:59:54 2008 +0000
6.2 +++ b/src/pvr2/rendsave.c Thu May 29 10:50:25 2008 +0000
6.3 @@ -21,6 +21,7 @@
6.4 #include <time.h>
6.5 #include <string.h>
6.6 #include "pvr2/pvr2.h"
6.7 +#include "pvr2/pvr2mmio.h"
6.8 #include "dreamcast.h"
6.9
6.10 /**
7.1 --- a/src/pvr2/scene.c Tue May 27 23:59:54 2008 +0000
7.2 +++ b/src/pvr2/scene.c Thu May 29 10:50:25 2008 +0000
7.3 @@ -23,6 +23,7 @@
7.4 #include "lxdream.h"
7.5 #include "display.h"
7.6 #include "pvr2/pvr2.h"
7.7 +#include "pvr2/pvr2mmio.h"
7.8 #include "pvr2/glutil.h"
7.9 #include "pvr2/scene.h"
7.10
8.1 --- a/src/pvr2/tacore.c Tue May 27 23:59:54 2008 +0000
8.2 +++ b/src/pvr2/tacore.c Thu May 29 10:50:25 2008 +0000
8.3 @@ -17,7 +17,8 @@
8.4 */
8.5 #include <string.h>
8.6 #include "lxdream.h"
8.7 -#include "pvr2.h"
8.8 +#include "pvr2/pvr2.h"
8.9 +#include "pvr2/pvr2mmio.h"
8.10 #include "asic.h"
8.11 #include "dream.h"
8.12
9.1 --- a/src/pvr2/texcache.c Tue May 27 23:59:54 2008 +0000
9.2 +++ b/src/pvr2/texcache.c Thu May 29 10:50:25 2008 +0000
9.3 @@ -21,6 +21,7 @@
9.4 #include <assert.h>
9.5 #include <string.h>
9.6 #include "pvr2/pvr2.h"
9.7 +#include "pvr2/pvr2mmio.h"
9.8
9.9 /** Specifies the maximum number of OpenGL
9.10 * textures we're willing to have open at a time. If more are
10.1 --- a/src/pvr2/yuv.c Tue May 27 23:59:54 2008 +0000
10.2 +++ b/src/pvr2/yuv.c Thu May 29 10:50:25 2008 +0000
10.3 @@ -18,6 +18,7 @@
10.4 #include "dream.h"
10.5 #include "asic.h"
10.6 #include "pvr2/pvr2.h"
10.7 +#include "pvr2/pvr2mmio.h"
10.8
10.9 #define YUV420_BLOCK_SIZE 384
10.10 #define YUV422_BLOCK_SIZE 512
.