Search
lxdream.org :: lxdream/src/cocoaui/cocoaui.m :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoaui.m
changeset 1109:700c5ab26a63
prev1098:4f2750753a6c
next1298:d0eb2307b847
author nkeynes
date Wed Feb 15 17:54:51 2012 +1000 (12 years ago)
permissions -rw-r--r--
last change Use GL_TEXTURE_2D instead of GL_TEXTURE_RECTANGLE_ARB for frame buffers, for
systems that don't provide the latter (and there's not really much
difference anyway).
Add macro wrangling for GL_DEPTH24_STENCIL8 format
file annotate diff log raw
1.1 --- a/src/cocoaui/cocoaui.m Sun Jan 31 18:36:06 2010 +1000
1.2 +++ b/src/cocoaui/cocoaui.m Wed Feb 15 17:54:51 2012 +1000
1.3 @@ -216,7 +216,8 @@
1.4 - (BOOL)application: (NSApplication *)app openFile: (NSString *)filename
1.5 {
1.6 const gchar *cname = [filename UTF8String];
1.7 - if( file_load_magic(cname) ) {
1.8 + ERROR err;
1.9 + if( file_load_magic(cname, FALSE, &err) != FILE_ERROR ) {
1.10 // Queue up a run event
1.11 gui_do_later(dreamcast_run);
1.12 return YES;
1.13 @@ -269,8 +270,12 @@
1.14 int result = [panel runModalForDirectory: path file: nil types: nil];
1.15 if( result == NSOKButton && [[panel filenames] count] > 0 ) {
1.16 NSString *filename = [[panel filenames] objectAtIndex: 0];
1.17 - file_load_magic( [filename UTF8String] );
1.18 + ERROR err;
1.19 + gboolean ok = file_load_exec( [filename UTF8String], &err );
1.20 set_gui_path(CONFIG_DEFAULT_PATH, [[panel directory] UTF8String]);
1.21 + if( !ok ) {
1.22 + ERROR( err.msg );
1.23 + }
1.24 }
1.25 }
1.26 - (void) mount_action: (id)sender
1.27 @@ -279,8 +284,12 @@
1.28 NSString *path = [NSString stringWithCString: get_gui_path(CONFIG_DEFAULT_PATH)];
1.29 int result = [panel runModalForDirectory: path file: nil types: nil];
1.30 if( result == NSOKButton && [[panel filenames] count] > 0 ) {
1.31 + ERROR err;
1.32 NSString *filename = [[panel filenames] objectAtIndex: 0];
1.33 - gdrom_mount_image( [filename UTF8String] );
1.34 + gboolean ok = gdrom_mount_image( [filename UTF8String], &err );
1.35 + if( !ok ) {
1.36 + ERROR(err.msg);
1.37 + }
1.38 set_gui_path(CONFIG_DEFAULT_PATH, [[panel directory] UTF8String]);
1.39 }
1.40 }
1.41 @@ -301,7 +310,11 @@
1.42 }
1.43 - (void) gdrom_list_action: (id)sender
1.44 {
1.45 - gdrom_list_set_selection( [sender tag] );
1.46 + ERROR err;
1.47 + gboolean ok = gdrom_list_set_selection( [sender tag], &err );
1.48 + if( !ok ) {
1.49 + ERROR( err.msg );
1.50 + }
1.51 }
1.52 - (void) fullscreen_action: (id)sender
1.53 {
.