mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 05:20:50 +00:00
vl: Move -config_path handling into main
This commit is contained in:
parent
6e1969001e
commit
2d5471c5be
10
softmmu/vl.c
10
softmmu/vl.c
@ -2794,16 +2794,6 @@ void qemu_init(int argc, char **argv, char **envp)
|
||||
// reporting. This should be replaced eventually, but is "good enough" for
|
||||
// now.
|
||||
//
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (argv[i] && strcmp(argv[i], "-config_path") == 0) {
|
||||
argv[i] = NULL;
|
||||
if (i < argc - 1 && argv[i+1]) {
|
||||
xemu_settings_set_path(argv[i+1]);
|
||||
argv[i+1] = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int first_boot = xemu_settings_did_fail_to_load();
|
||||
int fake_argc = 32 + argc;
|
||||
|
11
ui/xemu.c
11
ui/xemu.c
@ -1522,6 +1522,17 @@ int main(int argc, char **argv)
|
||||
gArgc = argc;
|
||||
gArgv = argv;
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (argv[i] && strcmp(argv[i], "-config_path") == 0) {
|
||||
argv[i] = NULL;
|
||||
if (i < argc - 1 && argv[i+1]) {
|
||||
xemu_settings_set_path(argv[i+1]);
|
||||
argv[i+1] = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
xemu_settings_load();
|
||||
atexit(xemu_settings_save);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user