mirror of https://github.com/xemu-project/xemu.git
ui: Show welcome screen until first save
This commit is contained in:
parent
dc669aca41
commit
8afd391ad0
|
@ -1,4 +1,7 @@
|
|||
general:
|
||||
show_welcome:
|
||||
type: bool
|
||||
default: true
|
||||
updates:
|
||||
check:
|
||||
type: bool
|
||||
|
|
|
@ -2789,7 +2789,6 @@ void qemu_init(int argc, char **argv, char **envp)
|
|||
// now.
|
||||
//
|
||||
|
||||
int first_boot = xemu_settings_did_fail_to_load();
|
||||
int fake_argc = 32 + argc;
|
||||
char **fake_argv = malloc(sizeof(char*)*fake_argc);
|
||||
memset(fake_argv, 0, sizeof(char*)*fake_argc);
|
||||
|
@ -2883,7 +2882,7 @@ void qemu_init(int argc, char **argv, char **envp)
|
|||
|
||||
const char *flashrom_path = g_config.sys.files.flashrom_path;
|
||||
autostart = 0; // Do not auto-start the machine without a valid BIOS file
|
||||
if (first_boot) {
|
||||
if (g_config.general.show_welcome) {
|
||||
// Don't display an error if this is the first boot. Give user a chance
|
||||
// to configure the path.
|
||||
} else if (xemu_check_file(flashrom_path)) {
|
||||
|
|
|
@ -671,6 +671,7 @@ public:
|
|||
xemu_settings_set_string(&g_config.sys.files.eeprom_path, eeprom_path);
|
||||
xemu_queue_notification("Settings saved. Restart to apply updates.");
|
||||
pending_restart = true;
|
||||
g_config.general.show_welcome = false;
|
||||
}
|
||||
|
||||
void FilePicker(const char *name, char *buf, size_t len, const char *filters)
|
||||
|
@ -2169,7 +2170,7 @@ void xemu_hud_init(SDL_Window* window, void* sdl_gl_context)
|
|||
ImGui_ImplSDL2_InitForOpenGL(window, sdl_gl_context);
|
||||
ImGui_ImplOpenGL3_Init("#version 150");
|
||||
|
||||
first_boot_window.is_open = xemu_settings_did_fail_to_load();
|
||||
first_boot_window.is_open = g_config.general.show_welcome;
|
||||
|
||||
int ui_scale_int = g_config.display.ui.scale;
|
||||
if (ui_scale_int < 1) ui_scale_int = 1;
|
||||
|
|
Loading…
Reference in New Issue