mirror of
https://github.com/david-schmidt/gsport.git
synced 2024-09-27 08:54:30 +00:00
Update Mac processing for finding cwd
This commit is contained in:
parent
69622cb30e
commit
e7ff3fbe25
@ -40,7 +40,10 @@ int g_accept_events = 0; // OG To know if the emulator is ready to accept extern
|
||||
|
||||
char g_argv0_path[256] = "./";
|
||||
|
||||
const char *g_gsport_default_paths[] = { "", "./", "${HOME}/","${CD}/","${PWD}/",
|
||||
const char *g_gsport_default_paths[] = { "", "./", "${HOME}/","${PWD}/",
|
||||
#ifdef MAC
|
||||
"${0}/../",
|
||||
#endif
|
||||
"${HOME}/Library/GSport/",
|
||||
"${0}/Contents/Resources/", "/usr/local/lib/",
|
||||
"/usr/local/gsport/", "/usr/local/lib/gsport/", "/usr/share/gsport/",
|
||||
@ -1292,7 +1295,11 @@ setup_gsport_file(char *outname, int maxlen, int ok_if_missing,
|
||||
if(can_create_file) {
|
||||
// If we didn't find a file, pick a place to put it.
|
||||
// Default is the current working directory.
|
||||
#ifdef MAC
|
||||
gsport_expand_path(&(local_path[0]), "${0}/../config.txt", 250);
|
||||
#else
|
||||
gsport_expand_path(&(local_path[0]), "${PWD}/config.txt", 250);
|
||||
#endif
|
||||
strcpy(outname, &(local_path[0]));
|
||||
// Ask user if it's OK to create the file (or just create it)
|
||||
x_dialog_create_gsport_conf(*name_ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user