mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-22 13:30:07 +00:00
GTK3: Fix --nogui option
This commit is contained in:
parent
94b687a626
commit
208c2645da
@ -430,7 +430,7 @@ static void gui_startup (void)
|
|||||||
#ifdef ENABLE_GTK_3_22
|
#ifdef ENABLE_GTK_3_22
|
||||||
color_scheme_set(APP_PREFERS_LIGHT);
|
color_scheme_set(APP_PREFERS_LIGHT);
|
||||||
#endif
|
#endif
|
||||||
if (!PrefsEditor())
|
if (use_gui && !PrefsEditor())
|
||||||
QuitEmulator();
|
QuitEmulator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,23 +514,28 @@ int main(int argc, char **argv)
|
|||||||
printf("switch address not defined\n");
|
printf("switch address not defined\n");
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
}
|
}
|
||||||
|
vde_sock = argv[i];
|
||||||
|
argv[i] = NULL;
|
||||||
|
} else if (strcmp(argv[i], "--nogui") == 0) {
|
||||||
// We intercept the --nogui commandline so that the settings
|
// We intercept the --nogui commandline so that the settings
|
||||||
// window can change the setting from the prefs file
|
// window can change the setting from the prefs file
|
||||||
} else if (strcmp(argv[i], "--nogui") == 0) {
|
|
||||||
argv[i++] = NULL;
|
argv[i++] = NULL;
|
||||||
if (i < argc) {
|
if (i < argc) {
|
||||||
if (strcmp(argv[i], "true") == 0)
|
if (strcmp(argv[i], "true") == 0) {
|
||||||
use_gui = false;
|
use_gui = false;
|
||||||
else
|
argv[i] = NULL;
|
||||||
|
}
|
||||||
|
else if (strcmp(argv[i], "false") == 0) {
|
||||||
use_gui = true;
|
use_gui = true;
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
}
|
}
|
||||||
// Alternative commands to enter the GUI
|
} else {
|
||||||
|
use_gui = false;
|
||||||
|
}
|
||||||
} else if (strcmp(argv[i], "--gui") == 0 || strcmp(argv[i], "--settings") == 0) {
|
} else if (strcmp(argv[i], "--gui") == 0 || strcmp(argv[i], "--settings") == 0) {
|
||||||
|
// Alternative commands to enter the GUI
|
||||||
use_gui = true;
|
use_gui = true;
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
vde_sock = argv[i];
|
|
||||||
argv[i] = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
|
@ -862,19 +862,24 @@ int main(int argc, char **argv)
|
|||||||
UserPrefsPath = argv[i];
|
UserPrefsPath = argv[i];
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
}
|
}
|
||||||
|
} else if (strcmp(argv[i], "--nogui") == 0) {
|
||||||
// We intercept the --nogui commandline so that the settings
|
// We intercept the --nogui commandline so that the settings
|
||||||
// window can change the setting from the prefs file
|
// window can change the setting from the prefs file
|
||||||
} else if (strcmp(argv[i], "--nogui") == 0) {
|
|
||||||
argv[i++] = NULL;
|
argv[i++] = NULL;
|
||||||
if (i < argc) {
|
if (i < argc) {
|
||||||
if (strcmp(argv[i], "true") == 0)
|
if (strcmp(argv[i], "true") == 0) {
|
||||||
use_gui = false;
|
use_gui = false;
|
||||||
else
|
argv[i] = NULL;
|
||||||
|
}
|
||||||
|
else if (strcmp(argv[i], "false") == 0) {
|
||||||
use_gui = true;
|
use_gui = true;
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
}
|
}
|
||||||
// Alternative commands to enter the GUI
|
} else {
|
||||||
|
use_gui = false;
|
||||||
|
}
|
||||||
} else if (strcmp(argv[i], "--gui") == 0 || strcmp(argv[i], "--settings") == 0) {
|
} else if (strcmp(argv[i], "--gui") == 0 || strcmp(argv[i], "--settings") == 0) {
|
||||||
|
// Alternative commands to enter the GUI
|
||||||
use_gui = true;
|
use_gui = true;
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
} else if (valid_vmdir(argv[i])) {
|
} else if (valid_vmdir(argv[i])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user