1.1 --- a/src/cocoaui/cocoaui.m Thu Jun 25 21:21:18 2009 +0000
1.2 +++ b/src/cocoaui/cocoaui.m Fri Jun 26 05:47:04 2009 +0000
1.5 #include "dreamcast.h"
1.7 +#include "lxpaths.h"
1.10 #include "gdrom/gdrom.h"
1.11 @@ -240,47 +241,47 @@
1.12 - (void) load_action: (id)sender
1.14 NSOpenPanel *panel = [NSOpenPanel openPanel];
1.15 - NSString *path = [NSString stringWithCString: gui_get_configurable_path(CONFIG_SAVE_PATH)];
1.16 + NSString *path = [NSString stringWithCString: get_gui_path(CONFIG_SAVE_PATH)];
1.17 NSArray *fileTypes = [NSArray arrayWithObject: @"dst"];
1.18 int result = [panel runModalForDirectory: path file: nil types: fileTypes];
1.19 if( result == NSOKButton && [[panel filenames] count] > 0 ) {
1.20 NSString *filename = [[panel filenames] objectAtIndex: 0];
1.21 dreamcast_load_state( [filename UTF8String] );
1.22 - gui_set_configurable_path(CONFIG_SAVE_PATH, [[panel directory] UTF8String]);
1.23 + set_gui_path(CONFIG_SAVE_PATH, [[panel directory] UTF8String]);
1.26 - (void) save_action: (id)sender
1.28 NSSavePanel *panel = [NSSavePanel savePanel];
1.29 - NSString *path = [NSString stringWithCString: gui_get_configurable_path(CONFIG_SAVE_PATH)];
1.30 + NSString *path = [NSString stringWithCString: get_gui_path(CONFIG_SAVE_PATH)];
1.31 [panel setRequiredFileType: @"dst"];
1.32 int result = [panel runModalForDirectory: path file:@""];
1.33 if( result == NSOKButton ) {
1.34 NSString *filename = [panel filename];
1.35 dreamcast_save_state( [filename UTF8String] );
1.36 - gui_set_configurable_path(CONFIG_SAVE_PATH, [[panel directory] UTF8String]);
1.37 + set_gui_path(CONFIG_SAVE_PATH, [[panel directory] UTF8String]);
1.40 - (void) load_binary_action: (id)sender
1.42 NSOpenPanel *panel = [NSOpenPanel openPanel];
1.43 - NSString *path = [NSString stringWithCString: gui_get_configurable_path(CONFIG_DEFAULT_PATH)];
1.44 + NSString *path = [NSString stringWithCString: get_gui_path(CONFIG_DEFAULT_PATH)];
1.45 int result = [panel runModalForDirectory: path file: nil types: nil];
1.46 if( result == NSOKButton && [[panel filenames] count] > 0 ) {
1.47 NSString *filename = [[panel filenames] objectAtIndex: 0];
1.48 file_load_magic( [filename UTF8String] );
1.49 - gui_set_configurable_path(CONFIG_DEFAULT_PATH, [[panel directory] UTF8String]);
1.50 + set_gui_path(CONFIG_DEFAULT_PATH, [[panel directory] UTF8String]);
1.53 - (void) mount_action: (id)sender
1.55 NSOpenPanel *panel = [NSOpenPanel openPanel];
1.56 - NSString *path = [NSString stringWithCString: gui_get_configurable_path(CONFIG_DEFAULT_PATH)];
1.57 + NSString *path = [NSString stringWithCString: get_gui_path(CONFIG_DEFAULT_PATH)];
1.58 int result = [panel runModalForDirectory: path file: nil types: nil];
1.59 if( result == NSOKButton && [[panel filenames] count] > 0 ) {
1.60 NSString *filename = [[panel filenames] objectAtIndex: 0];
1.61 gdrom_mount_image( [filename UTF8String] );
1.62 - gui_set_configurable_path(CONFIG_DEFAULT_PATH, [[panel directory] UTF8String]);
1.63 + set_gui_path(CONFIG_DEFAULT_PATH, [[panel directory] UTF8String]);
1.66 - (void) pause_action: (id)sender