filename | src/cocoaui/cocoaui.m |
changeset | 1109:700c5ab26a63 |
prev | 1098:4f2750753a6c |
next | 1298:d0eb2307b847 |
author | nkeynes |
date | Tue Feb 28 18:22:52 2012 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Add a GL-only video driver for android usage (since the Java code is responsible for creating the context) |
file | annotate | diff | log | raw |
1.1 --- a/src/cocoaui/cocoaui.m Sun Jan 31 18:36:06 2010 +10001.2 +++ b/src/cocoaui/cocoaui.m Tue Feb 28 18:22:52 2012 +10001.3 @@ -216,7 +216,8 @@1.4 - (BOOL)application: (NSApplication *)app openFile: (NSString *)filename1.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 event1.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)sender1.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)sender1.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)sender1.53 {
.