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:
|
general:
|
||||||
|
show_welcome:
|
||||||
|
type: bool
|
||||||
|
default: true
|
||||||
updates:
|
updates:
|
||||||
check:
|
check:
|
||||||
type: bool
|
type: bool
|
||||||
|
|
|
@ -2789,7 +2789,6 @@ void qemu_init(int argc, char **argv, char **envp)
|
||||||
// now.
|
// now.
|
||||||
//
|
//
|
||||||
|
|
||||||
int first_boot = xemu_settings_did_fail_to_load();
|
|
||||||
int fake_argc = 32 + argc;
|
int fake_argc = 32 + argc;
|
||||||
char **fake_argv = malloc(sizeof(char*)*fake_argc);
|
char **fake_argv = malloc(sizeof(char*)*fake_argc);
|
||||||
memset(fake_argv, 0, 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;
|
const char *flashrom_path = g_config.sys.files.flashrom_path;
|
||||||
autostart = 0; // Do not auto-start the machine without a valid BIOS file
|
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
|
// Don't display an error if this is the first boot. Give user a chance
|
||||||
// to configure the path.
|
// to configure the path.
|
||||||
} else if (xemu_check_file(flashrom_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_settings_set_string(&g_config.sys.files.eeprom_path, eeprom_path);
|
||||||
xemu_queue_notification("Settings saved. Restart to apply updates.");
|
xemu_queue_notification("Settings saved. Restart to apply updates.");
|
||||||
pending_restart = true;
|
pending_restart = true;
|
||||||
|
g_config.general.show_welcome = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilePicker(const char *name, char *buf, size_t len, const char *filters)
|
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_ImplSDL2_InitForOpenGL(window, sdl_gl_context);
|
||||||
ImGui_ImplOpenGL3_Init("#version 150");
|
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;
|
int ui_scale_int = g_config.display.ui.scale;
|
||||||
if (ui_scale_int < 1) ui_scale_int = 1;
|
if (ui_scale_int < 1) ui_scale_int = 1;
|
||||||
|
|
Loading…
Reference in New Issue