Search
lxdream.org :: lxdream :: r758:99ae000d4e09
lxdream 0.9.1
released Jun 29
Download Now
changeset758:99ae000d4e09
parent757:2780bc393e7c
child759:f16975739abc
authornkeynes
dateMon Jul 21 00:37:13 2008 +0000 (12 years ago)
Fix compiler warnings
src/cocoaui/cocoa_gd.c
src/drivers/gl_fbo.c
src/drivers/osx_iokit.c
src/sh4/sh4core.in
1.1 --- a/src/cocoaui/cocoa_gd.c Mon Jul 21 00:16:09 2008 +0000
1.2 +++ b/src/cocoaui/cocoa_gd.c Mon Jul 21 00:37:13 2008 +0000
1.3 @@ -55,7 +55,7 @@
1.4 cocoa_gdrom_menu_build( menu );
1.5 }
1.6
1.7 -void cocoa_gdrom_menu_update( gboolean list_changed, int selection, void *user_data )
1.8 +gboolean cocoa_gdrom_menu_update( gboolean list_changed, int selection, void *user_data )
1.9 {
1.10 // Create an auto-release pool - we may be called outside of the GUI main loop
1.11 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
1.12 @@ -74,6 +74,7 @@
1.13 }
1.14 }
1.15 [pool release];
1.16 + return TRUE;
1.17 }
1.18
1.19 NSMenu *cocoa_gdrom_menu_new()
2.1 --- a/src/drivers/gl_fbo.c Mon Jul 21 00:16:09 2008 +0000
2.2 +++ b/src/drivers/gl_fbo.c Mon Jul 21 00:37:13 2008 +0000
2.3 @@ -201,11 +201,13 @@
2.4
2.5 static render_buffer_t gl_fbo_create_render_buffer( uint32_t width, uint32_t height )
2.6 {
2.7 + GLuint tex;
2.8 render_buffer_t buffer = calloc( sizeof(struct render_buffer), 1 );
2.9 buffer->width = width;
2.10 buffer->height = height;
2.11 - glGenTextures( 1, &buffer->buf_id );
2.12 - glBindTexture( GL_TEXTURE_RECTANGLE_ARB, buffer->buf_id );
2.13 + glGenTextures( 1, &tex );
2.14 + buffer->buf_id = tex;
2.15 + glBindTexture( GL_TEXTURE_RECTANGLE_ARB, tex );
2.16 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP );
2.17 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP );
2.18 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
2.19 @@ -217,6 +219,7 @@
2.20 static void gl_fbo_destroy_render_buffer( render_buffer_t buffer )
2.21 {
2.22 int i,j;
2.23 + GLuint tex = buffer->buf_id;
2.24 for( i=0; i<MAX_FRAMEBUFFERS; i++ ) {
2.25 for( j=0; j < MAX_TEXTURES_PER_FB; j++ ) {
2.26 if( fbo[i].tex_ids[j] == buffer->buf_id ) {
2.27 @@ -228,7 +231,7 @@
2.28 }
2.29 }
2.30
2.31 - glDeleteTextures( 1, &buffer->buf_id );
2.32 + glDeleteTextures( 1, &tex );
2.33 buffer->buf_id = 0;
2.34 free( buffer );
2.35 }
3.1 --- a/src/drivers/osx_iokit.c Mon Jul 21 00:16:09 2008 +0000
3.2 +++ b/src/drivers/osx_iokit.c Mon Jul 21 00:37:13 2008 +0000
3.3 @@ -19,15 +19,19 @@
3.4 * GNU General Public License for more details.
3.5 */
3.6
3.7 +#include <glib/gmem.h>
3.8 #include <sys/param.h>
3.9 #include <paths.h>
3.10 #include <string.h>
3.11 #include <stdio.h>
3.12 #include <fcntl.h>
3.13 +#include <CoreFoundation/CFRunLoop.h>
3.14 #include <IOKit/IOMessage.h>
3.15 #include <IOKit/hid/IOHIDLib.h>
3.16 #include "osx_iokit.h"
3.17
3.18 +
3.19 +
3.20 static IONotificationPortRef notify_port = 0;
3.21 static io_iterator_t iokit_iterators[4] = {0,0,0,0};
3.22
3.23 @@ -315,7 +319,7 @@
3.24 {
3.25 notify_port = IONotificationPortCreate( kIOMasterPortDefault );
3.26 CFRunLoopSourceRef runloop_source = IONotificationPortGetRunLoopSource( notify_port );
3.27 - CFRunLoopAddSource( CFRunLoopGetMain(), runloop_source, kCFRunLoopCommonModes );
3.28 + CFRunLoopAddSource( CFRunLoopGetCurrent(), runloop_source, kCFRunLoopCommonModes );
3.29
3.30 // Drive notifications
3.31 if( IOServiceAddMatchingNotification( notify_port, kIOFirstPublishNotification,
3.32 @@ -342,7 +346,7 @@
3.33 void osx_unregister_iokit_notifications()
3.34 {
3.35 CFRunLoopSourceRef runloop_source = IONotificationPortGetRunLoopSource( notify_port );
3.36 - CFRunLoopRemoveSource( CFRunLoopGetMain(), runloop_source, kCFRunLoopCommonModes );
3.37 + CFRunLoopRemoveSource( CFRunLoopGetCurrent(), runloop_source, kCFRunLoopCommonModes );
3.38 IONotificationPortDestroy( notify_port );
3.39 notify_port = 0;
3.40 }
4.1 --- a/src/sh4/sh4core.in Mon Jul 21 00:16:09 2008 +0000
4.2 +++ b/src/sh4/sh4core.in Mon Jul 21 00:37:13 2008 +0000
4.3 @@ -1158,7 +1158,7 @@
4.4 FSCA FPUL, FRn {:
4.5 CHECKFPUEN();
4.6 if( !IS_FPU_DOUBLEPREC() ) {
4.7 - sh4_fsca( FPULi, &(DRF(FRn>>1)) );
4.8 + sh4_fsca( FPULi, (float *)&(DRF(FRn>>1)) );
4.9 /*
4.10 float angle = (((float)(FPULi&0xFFFF))/65536.0) * 2 * M_PI;
4.11 FR(FRn) = sinf(angle);
4.12 @@ -1169,7 +1169,7 @@
4.13 FTRV XMTRX, FVn {:
4.14 CHECKFPUEN();
4.15 if( !IS_FPU_DOUBLEPREC() ) {
4.16 - sh4_ftrv(&(DRF(FVn<<1)) );
4.17 + sh4_ftrv((float *)&(DRF(FVn<<1)) );
4.18 }
4.19 :}
4.20 UNDEF {:
.