Search
lxdream.org :: lxdream :: r424:421d68e78c46
lxdream 0.9.1
released Jun 29
Download Now
changeset424:421d68e78c46
parent423:f92f80fe64da
child425:17f019f4ed8d
authornkeynes
dateSun Oct 07 05:42:25 2007 +0000 (12 years ago)
Fix compilation warnings
src/display.h
src/drivers/audio_esd.c
src/drivers/gl_common.c
src/drivers/gl_fbo.c
src/drivers/gl_sl.c
src/drivers/video_gtk.c
src/drivers/video_null.c
src/drivers/video_x11.c
1.1 --- a/src/display.h Sat Oct 06 09:04:53 2007 +0000
1.2 +++ b/src/display.h Sun Oct 07 05:42:25 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: display.h,v 1.7 2007-10-06 08:59:42 nkeynes Exp $
1.6 + * $Id: display.h,v 1.8 2007-10-07 05:42:24 nkeynes Exp $
1.7 *
1.8 * The PC side of the video support (responsible for actually displaying /
1.9 * rendering frames)
1.10 @@ -62,7 +62,7 @@
1.11 sh4addr_t address; /* Address buffer was rendered to, or -1 for unrendered */
1.12 uint32_t size; /* Size of buffer in bytes, must be width*height*bpp */
1.13 int scale;
1.14 - int buf_id; /* driver-specific buffer id, if applicable */
1.15 + unsigned int buf_id; /* driver-specific buffer id, if applicable */
1.16 gboolean flushed; /* True if the buffer has been flushed to vram */
1.17 } *render_buffer_t;
1.18
2.1 --- a/src/drivers/audio_esd.c Sat Oct 06 09:04:53 2007 +0000
2.2 +++ b/src/drivers/audio_esd.c Sun Oct 07 05:42:25 2007 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: audio_esd.c,v 1.8 2006-07-02 04:59:00 nkeynes Exp $
2.6 + * $Id: audio_esd.c,v 1.9 2007-10-07 05:42:25 nkeynes Exp $
2.7 *
2.8 * The esd (esound) audio driver
2.9 *
2.10 @@ -15,6 +15,8 @@
2.11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2.12 * GNU General Public License for more details.
2.13 */
2.14 +#include <stdio.h>
2.15 +#include <unistd.h>
2.16 #include <esd.h>
2.17 #include "aica/audio.h"
2.18 #include "dream.h"
3.1 --- a/src/drivers/gl_common.c Sat Oct 06 09:04:53 2007 +0000
3.2 +++ b/src/drivers/gl_common.c Sun Oct 07 05:42:25 2007 +0000
3.3 @@ -1,5 +1,5 @@
3.4 /**
3.5 - * $Id: gl_common.c,v 1.1 2007-02-11 10:09:32 nkeynes Exp $
3.6 + * $Id: gl_common.c,v 1.2 2007-10-07 05:42:25 nkeynes Exp $
3.7 *
3.8 * Common GL code that doesn't depend on a specific implementation
3.9 *
3.10 @@ -77,7 +77,6 @@
3.11 GLenum type = colour_formats[frame->colour_format].type;
3.12 GLenum format = colour_formats[frame->colour_format].format;
3.13 int bpp = colour_formats[frame->colour_format].bpp;
3.14 - GLint texid;
3.15
3.16 glViewport( 0, 0, video_width, video_height );
3.17 glMatrixMode(GL_PROJECTION);
3.18 @@ -150,9 +149,9 @@
3.19 glFinish();
3.20 GLenum type = colour_formats[buffer->colour_format].type;
3.21 GLenum format = colour_formats[buffer->colour_format].format;
3.22 - int line_size = buffer->width * colour_formats[buffer->colour_format].bpp;
3.23 - int size = line_size * buffer->height;
3.24 - int rowstride = (buffer->rowstride / colour_formats[buffer->colour_format].bpp) - buffer->width;
3.25 + // int line_size = buffer->width * colour_formats[buffer->colour_format].bpp;
3.26 + // int size = line_size * buffer->height;
3.27 + // int rowstride = (buffer->rowstride / colour_formats[buffer->colour_format].bpp) - buffer->width;
3.28 // glPixelStorei( GL_PACK_ROW_LENGTH, rowstride );
3.29
3.30 glReadPixels( 0, 0, buffer->width, buffer->height, format, type, target );
4.1 --- a/src/drivers/gl_fbo.c Sat Oct 06 09:04:53 2007 +0000
4.2 +++ b/src/drivers/gl_fbo.c Sun Oct 07 05:42:25 2007 +0000
4.3 @@ -1,5 +1,5 @@
4.4 /**
4.5 - * $Id: gl_fbo.c,v 1.1 2007-02-11 10:09:32 nkeynes Exp $
4.6 + * $Id: gl_fbo.c,v 1.2 2007-10-07 05:42:25 nkeynes Exp $
4.7 *
4.8 * GL framebuffer-based driver shell. This requires the EXT_framebuffer_object
4.9 * extension, but is much nicer/faster/etc than pbuffers when it's available.
4.10 @@ -22,8 +22,13 @@
4.11 * GNU General Public License for more details.
4.12 */
4.13
4.14 +#define GL_GLEXT_PROTOTYPES 1
4.15 +
4.16 #include <GL/gl.h>
4.17 +#include <GL/glext.h>
4.18 #include "display.h"
4.19 +#include "drivers/video_x11.h"
4.20 +#include "drivers/gl_common.h"
4.21
4.22 #define MAX_FRAMEBUFFERS 2
4.23 #define MAX_TEXTURES_PER_FB 4
4.24 @@ -67,11 +72,11 @@
4.25 void gl_fbo_init( display_driver_t driver )
4.26 {
4.27 int i,j;
4.28 - int fbids[MAX_FRAMEBUFFERS];
4.29 - int rbids[MAX_FRAMEBUFFERS*2]; /* depth buffer, stencil buffer per fb */
4.30 + GLuint fbids[MAX_FRAMEBUFFERS];
4.31 + GLuint rbids[MAX_FRAMEBUFFERS*2]; /* depth buffer, stencil buffer per fb */
4.32
4.33 - glGenFramebuffersEXT( MAX_FRAMEBUFFERS, &fbids );
4.34 - glGenRenderbuffersEXT( MAX_FRAMEBUFFERS*2, &rbids );
4.35 + glGenFramebuffersEXT( MAX_FRAMEBUFFERS, &fbids[0] );
4.36 + glGenRenderbuffersEXT( MAX_FRAMEBUFFERS*2, &rbids[0] );
4.37 for( i=0; i<MAX_FRAMEBUFFERS; i++ ) {
4.38 fbo[i].fb_id = fbids[i];
4.39 fbo[i].depth_id = rbids[i*2];
4.40 @@ -225,7 +230,7 @@
4.41 {
4.42 glGetError();
4.43 int fb = gl_fbo_get_framebuffer( buffer->width, buffer->height );
4.44 - GLint attach = gl_fbo_attach_texture( fb, buffer->buf_id );
4.45 + gl_fbo_attach_texture( fb, buffer->buf_id );
4.46 /* setup the gl context */
4.47 glViewport( 0, 0, buffer->width, buffer->height );
4.48
4.49 @@ -293,7 +298,7 @@
4.50 static gboolean gl_fbo_read_render_buffer( render_buffer_t buffer, char *target )
4.51 {
4.52 int fb = gl_fbo_get_framebuffer( buffer->width, buffer->height );
4.53 - GLint attach = gl_fbo_attach_texture( fb, buffer->buf_id );
4.54 + gl_fbo_attach_texture( fb, buffer->buf_id );
4.55 return gl_read_render_buffer( buffer, target );
4.56 }
4.57
5.1 --- a/src/drivers/gl_sl.c Sat Oct 06 09:04:53 2007 +0000
5.2 +++ b/src/drivers/gl_sl.c Sun Oct 07 05:42:25 2007 +0000
5.3 @@ -1,5 +1,5 @@
5.4 /**
5.5 - * $Id: gl_sl.c,v 1.1 2007-09-28 07:24:14 nkeynes Exp $
5.6 + * $Id: gl_sl.c,v 1.2 2007-10-07 05:42:25 nkeynes Exp $
5.7 *
5.8 * GLSL shader loader/unloader. Current version assumes there's exactly
5.9 * 1 shader program that's used globally. This may turn out not to be the
5.10 @@ -18,6 +18,7 @@
5.11 * GNU General Public License for more details.
5.12 */
5.13
5.14 +#define GL_GLEXT_PROTOTYPES 1
5.15
5.16 #include <GL/gl.h>
5.17 #include <GL/glext.h>
6.1 --- a/src/drivers/video_gtk.c Sat Oct 06 09:04:53 2007 +0000
6.2 +++ b/src/drivers/video_gtk.c Sun Oct 07 05:42:25 2007 +0000
6.3 @@ -1,5 +1,5 @@
6.4 /**
6.5 - * $Id: video_gtk.c,v 1.11 2007-09-08 04:05:35 nkeynes Exp $
6.6 + * $Id: video_gtk.c,v 1.12 2007-10-07 05:42:25 nkeynes Exp $
6.7 *
6.8 * The PC side of the video support (responsible for actually displaying /
6.9 * rendering frames)
6.10 @@ -44,6 +44,7 @@
6.11 gpointer user_data)
6.12 {
6.13 input_event_keydown( event->keyval );
6.14 + return TRUE;
6.15 }
6.16
6.17 uint16_t video_gtk_resolve_keysym( const gchar *keysym )
6.18 @@ -59,6 +60,7 @@
6.19 gpointer user_data)
6.20 {
6.21 input_event_keyup( event->keyval );
6.22 + return TRUE;
6.23 }
6.24
6.25 gboolean video_gtk_init()
7.1 --- a/src/drivers/video_null.c Sat Oct 06 09:04:53 2007 +0000
7.2 +++ b/src/drivers/video_null.c Sun Oct 07 05:42:25 2007 +0000
7.3 @@ -1,5 +1,5 @@
7.4 /**
7.5 - * $Id: video_null.c,v 1.3 2007-02-11 10:09:32 nkeynes Exp $
7.6 + * $Id: video_null.c,v 1.4 2007-10-07 05:42:25 nkeynes Exp $
7.7 *
7.8 * Null video output driver (ie no video output whatsoever)
7.9 *
7.10 @@ -25,7 +25,6 @@
7.11
7.12 void video_null_destroy_render_buffer( render_buffer_t buffer )
7.13 {
7.14 - return TRUE;
7.15 }
7.16
7.17 gboolean video_null_set_render_target( render_buffer_t buffer )
7.18 @@ -65,7 +64,7 @@
7.19 video_null_create_render_buffer,
7.20 video_null_destroy_render_buffer,
7.21 video_null_set_render_target,
7.22 + video_null_display_frame_buffer,
7.23 video_null_display_render_buffer,
7.24 - video_null_display_frame_buffer,
7.25 video_null_display_blank,
7.26 video_null_read_render_buffer };
8.1 --- a/src/drivers/video_x11.c Sat Oct 06 09:04:53 2007 +0000
8.2 +++ b/src/drivers/video_x11.c Sun Oct 07 05:42:25 2007 +0000
8.3 @@ -1,5 +1,5 @@
8.4 /**
8.5 - * $Id: video_x11.c,v 1.14 2007-09-28 07:24:14 nkeynes Exp $
8.6 + * $Id: video_x11.c,v 1.15 2007-10-07 05:42:25 nkeynes Exp $
8.7 *
8.8 * Shared functions for all X11-based display drivers.
8.9 *
8.10 @@ -40,6 +40,8 @@
8.11 static Window glx_window;
8.12 static XSetWindowAttributes win_attrs;
8.13
8.14 +gboolean video_glx_create_window( int width, int height );
8.15 +
8.16 gboolean video_glx_init( Display *display, Screen *screen, Window window,
8.17 int width, int height, display_driver_t driver )
8.18 {
8.19 @@ -76,7 +78,6 @@
8.20 gboolean video_glx_create_window( int width, int height )
8.21 {
8.22 int major, minor;
8.23 - const char *glxExts, *glxServer;
8.24 int visual_attrs[] = { GLX_RGBA, GLX_RED_SIZE, 4,
8.25 GLX_GREEN_SIZE, 4,
8.26 GLX_BLUE_SIZE, 4,
8.27 @@ -176,6 +177,7 @@
8.28 lists = glGenLists(96);
8.29 glXUseXFont(font->fid, 32, 96, lists);
8.30 XFreeFont(video_x11_display, font);
8.31 + return lists;
8.32 }
8.33
8.34
.