Search
lxdream.org :: lxdream :: r481:3b2d6c5a19ad
lxdream 0.9.1
released Jun 29
Download Now
changeset481:3b2d6c5a19ad
parent480:d28c2992f5ee
child482:42da008cd8bf
authornkeynes
dateWed Oct 31 12:05:23 2007 +0000 (12 years ago)
Fix miscellaneous warnings
src/drivers/gl_common.c
src/drivers/video_gtk.c
src/drivers/video_null.c
src/drivers/video_x11.c
src/gui/path_dlg.c
src/loader.c
src/pvr2/pvr2.h
src/util.c
1.1 --- a/src/drivers/gl_common.c Wed Oct 31 11:53:35 2007 +0000
1.2 +++ b/src/drivers/gl_common.c Wed Oct 31 12:05:23 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: gl_common.c,v 1.6 2007-10-31 09:10:23 nkeynes Exp $
1.6 + * $Id: gl_common.c,v 1.7 2007-10-31 12:05:23 nkeynes Exp $
1.7 *
1.8 * Common GL code that doesn't depend on a specific implementation
1.9 *
1.10 @@ -20,6 +20,7 @@
1.11
1.12 #include <GL/gl.h>
1.13 #include "dream.h"
1.14 +#include "pvr2/pvr2.h"
1.15 #include "drivers/gl_common.h"
1.16
1.17 extern uint32_t video_width, video_height;
1.18 @@ -166,7 +167,8 @@
1.19 glPixelStorei( GL_UNPACK_ROW_LENGTH, rowstride );
1.20 glBindTexture( GL_TEXTURE_RECTANGLE_ARB, render->buf_id );
1.21 glTexSubImage2D( GL_TEXTURE_RECTANGLE_ARB, 0, 0,0,
1.22 - frame->width, frame->height, format, type, frame->data );
1.23 + frame->width, frame->height, format, type, frame->data );
1.24 + return TRUE;
1.25 }
1.26
1.27 gboolean gl_display_blank( uint32_t colour )
2.1 --- a/src/drivers/video_gtk.c Wed Oct 31 11:53:35 2007 +0000
2.2 +++ b/src/drivers/video_gtk.c Wed Oct 31 12:05:23 2007 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: video_gtk.c,v 1.17 2007-10-31 09:10:23 nkeynes Exp $
2.6 + * $Id: video_gtk.c,v 1.18 2007-10-31 12:05:23 nkeynes Exp $
2.7 *
2.8 * The PC side of the video support (responsible for actually displaying /
2.9 * rendering frames)
2.10 @@ -23,6 +23,7 @@
2.11 #include "dream.h"
2.12 #include "display.h"
2.13 #include "drivers/video_x11.h"
2.14 +#include "drivers/gl_common.h"
2.15 #include "gui/gtkui.h"
2.16
2.17 static GtkWidget *video_win = NULL;
3.1 --- a/src/drivers/video_null.c Wed Oct 31 11:53:35 2007 +0000
3.2 +++ b/src/drivers/video_null.c Wed Oct 31 12:05:23 2007 +0000
3.3 @@ -1,5 +1,5 @@
3.4 /**
3.5 - * $Id: video_null.c,v 1.6 2007-10-31 09:10:23 nkeynes Exp $
3.6 + * $Id: video_null.c,v 1.7 2007-10-31 12:05:23 nkeynes Exp $
3.7 *
3.8 * Null video output driver (ie no video output whatsoever)
3.9 *
3.10 @@ -37,14 +37,13 @@
3.11 return TRUE;
3.12 }
3.13
3.14 -gboolean video_null_read_render_buffer( unsigned char *target, render_buffer_t buffer, int format )
3.15 +gboolean video_null_read_render_buffer( unsigned char *target, render_buffer_t buffer, int rowstride, int format )
3.16 {
3.17 return TRUE;
3.18 }
3.19
3.20 -gboolean video_null_display_frame_buffer( frame_buffer_t buffer )
3.21 +void video_null_load_frame_buffer( frame_buffer_t frame, render_buffer_t buffer )
3.22 {
3.23 - return TRUE;
3.24 }
3.25
3.26 gboolean video_null_display_blank( uint32_t colour )
3.27 @@ -64,7 +63,7 @@
3.28 video_null_create_render_buffer,
3.29 video_null_destroy_render_buffer,
3.30 video_null_set_render_target,
3.31 - video_null_display_frame_buffer,
3.32 + video_null_load_frame_buffer,
3.33 video_null_display_render_buffer,
3.34 video_null_display_blank,
3.35 video_null_read_render_buffer };
4.1 --- a/src/drivers/video_x11.c Wed Oct 31 11:53:35 2007 +0000
4.2 +++ b/src/drivers/video_x11.c Wed Oct 31 12:05:23 2007 +0000
4.3 @@ -1,5 +1,5 @@
4.4 /**
4.5 - * $Id: video_x11.c,v 1.19 2007-10-31 09:11:14 nkeynes Exp $
4.6 + * $Id: video_x11.c,v 1.20 2007-10-31 12:05:23 nkeynes Exp $
4.7 *
4.8 * Shared functions for all X11-based display drivers.
4.9 *
4.10 @@ -41,6 +41,7 @@
4.11 static XSetWindowAttributes win_attrs;
4.12
4.13 gboolean video_glx_create_window( int width, int height );
4.14 +gboolean video_glx_init_context( Window window );
4.15
4.16 gboolean video_glx_init( Display *display, Screen *screen, Window window,
4.17 int width, int height, display_driver_t driver )
5.1 --- a/src/gui/path_dlg.c Wed Oct 31 11:53:35 2007 +0000
5.2 +++ b/src/gui/path_dlg.c Wed Oct 31 12:05:23 2007 +0000
5.3 @@ -1,5 +1,5 @@
5.4 /**
5.5 - * $Id: path_dlg.c,v 1.3 2007-10-23 10:48:24 nkeynes Exp $
5.6 + * $Id: path_dlg.c,v 1.4 2007-10-31 12:05:23 nkeynes Exp $
5.7 *
5.8 * Define the main (emu) GTK window, along with its menubars,
5.9 * toolbars, etc.
5.10 @@ -21,6 +21,7 @@
5.11 #include <gtk/gtk.h>
5.12
5.13 #include "dream.h"
5.14 +#include "dreamcast.h"
5.15 #include "config.h"
5.16 #include "gui/gtkui.h"
5.17
5.18 @@ -55,6 +56,7 @@
5.19 gtk_entry_set_text(GTK_ENTRY(entry), filename);
5.20 }
5.21 gtk_widget_destroy(file);
5.22 + return TRUE;
5.23 }
5.24
5.25 static gboolean path_dir_button_clicked( GtkWidget *button, gpointer user_data )
5.26 @@ -76,17 +78,12 @@
5.27 gtk_entry_set_text(GTK_ENTRY(entry), filename);
5.28 }
5.29 gtk_widget_destroy(file);
5.30 -}
5.31 -
5.32 -static gboolean path_text_changed( GtkWidget *entry, gpointer user_data )
5.33 -{
5.34 - const gchar *text = gtk_entry_get_text( GTK_ENTRY(entry) );
5.35 + return TRUE;
5.36 }
5.37
5.38 GtkWidget *path_panel_new(void)
5.39 {
5.40 GtkWidget *table = gtk_table_new( 5, 3, FALSE );
5.41 - GtkWidget *desc = gtk_label_new(NULL);
5.42 int i;
5.43 for( i=0; i<5; i++ ) {
5.44 GtkWidget *text = path_entry[i] = gtk_entry_new();
6.1 --- a/src/loader.c Wed Oct 31 11:53:35 2007 +0000
6.2 +++ b/src/loader.c Wed Oct 31 12:05:23 2007 +0000
6.3 @@ -1,5 +1,5 @@
6.4 /**
6.5 - * $Id: loader.c,v 1.20 2007-10-21 05:20:35 nkeynes Exp $
6.6 + * $Id: loader.c,v 1.21 2007-10-31 12:05:23 nkeynes Exp $
6.7 *
6.8 * File loading routines, mostly for loading demos without going through the
6.9 * whole procedure of making a CD image for them.
6.10 @@ -17,6 +17,7 @@
6.11 * GNU General Public License for more details.
6.12 */
6.13
6.14 +#include <unistd.h>
6.15 #include <stdio.h>
6.16 #include <fcntl.h>
6.17 #include <sys/stat.h>
6.18 @@ -31,6 +32,9 @@
6.19 #include "loader.h"
6.20 #include "syscall.h"
6.21
6.22 +// FIXME: This probably shouldn't be here
6.23 +#include <gui/gtkui.h>
6.24 +
6.25 char bootstrap_magic[32] = "SEGA SEGAKATANA SEGA ENTERPRISES";
6.26 char iso_magic[6] = "\001CD001";
6.27 char *file_loader_extensions[][2] = {
7.1 --- a/src/pvr2/pvr2.h Wed Oct 31 11:53:35 2007 +0000
7.2 +++ b/src/pvr2/pvr2.h Wed Oct 31 12:05:23 2007 +0000
7.3 @@ -1,5 +1,5 @@
7.4 /**
7.5 - * $Id: pvr2.h,v 1.37 2007-10-09 08:46:21 nkeynes Exp $
7.6 + * $Id: pvr2.h,v 1.38 2007-10-31 12:05:23 nkeynes Exp $
7.7 *
7.8 * PVR2 (video chip) functions and macros.
7.9 *
7.10 @@ -65,6 +65,7 @@
7.11 void pvr2_next_frame( void );
7.12 void pvr2_set_base_address( uint32_t );
7.13 int pvr2_get_frame_count( void );
7.14 +render_buffer_t pvr2_get_front_buffer();
7.15 gboolean pvr2_save_next_scene( const gchar *filename );
7.16
7.17 #define PVR2_CMD_END_OF_LIST 0x00
8.1 --- a/src/util.c Wed Oct 31 11:53:35 2007 +0000
8.2 +++ b/src/util.c Wed Oct 31 12:05:23 2007 +0000
8.3 @@ -1,5 +1,5 @@
8.4 /**
8.5 - * $Id: util.c,v 1.11 2007-10-31 09:10:23 nkeynes Exp $
8.6 + * $Id: util.c,v 1.12 2007-10-31 12:05:23 nkeynes Exp $
8.7 *
8.8 * Miscellaneous utility functions.
8.9 *
8.10 @@ -27,6 +27,7 @@
8.11 #include <png.h>
8.12 #include "dream.h"
8.13 #include "display.h"
8.14 +#include "gui.h"
8.15 #include "sh4/sh4core.h"
8.16
8.17 char *msg_levels[] = { "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" };
8.18 @@ -170,13 +171,13 @@
8.19 }
8.20 png_set_bgr(png_ptr);
8.21 if( buffer->inverted ) {
8.22 - p = buffer->data + (buffer->height*buffer->rowstride) - buffer->rowstride;
8.23 + p = (png_bytep)(buffer->data + (buffer->height*buffer->rowstride) - buffer->rowstride);
8.24 for(i=0; i<buffer->height; i++ ) {
8.25 png_write_row(png_ptr, p);
8.26 p-=buffer->rowstride;
8.27 }
8.28 } else {
8.29 - p = buffer->data;
8.30 + p = (png_bytep)buffer->data;
8.31 for(i=0; i<buffer->height; i++ ) {
8.32 png_write_row(png_ptr, p);
8.33 p+=buffer->rowstride;
8.34 @@ -240,7 +241,7 @@
8.35 buffer->colour_format = COLFMT_RGB888;
8.36 }
8.37
8.38 - p = buffer->data;
8.39 + p = (png_bytep)buffer->data;
8.40 for( i=0; i<height; i++ ) {
8.41 png_read_row(png_ptr, p, NULL );
8.42 p += rowbytes;
8.43 @@ -253,9 +254,7 @@
8.44
8.45 void log_message( void *ptr, int level, const gchar *source, const char *msg, ... )
8.46 {
8.47 - char buf[20], addr[10] = "", *p;
8.48 - const gchar *arr[4] = {buf, source, addr};
8.49 - int posn;
8.50 + char buf[20];
8.51 time_t tm = time(NULL);
8.52 va_list ap;
8.53
.