mirror of
https://github.com/LIV2/WinUAE.git
synced 2025-12-06 00:12:52 +00:00
Reset windowed/fullscreen state when restarting.
This commit is contained in:
parent
55b7a6120f
commit
f59e51c6e7
@ -29,7 +29,7 @@ extern int sleep_resolution;
|
||||
|
||||
extern void uae_reset (int, int);
|
||||
extern void uae_quit (void);
|
||||
extern void uae_restart (int, const TCHAR*);
|
||||
extern void uae_restart(struct uae_prefs*, int, const TCHAR*);
|
||||
extern void target_reset (void);
|
||||
extern void target_addtorecent (const TCHAR*, int);
|
||||
extern void target_run (void);
|
||||
|
||||
@ -4956,7 +4956,7 @@ static bool inputdevice_handle_inputcode2(int monid, int code, int state, const
|
||||
uae_reset (1, 1);
|
||||
break;
|
||||
case AKS_RESTART:
|
||||
uae_restart(-1, NULL);
|
||||
uae_restart(&currprefs, -1, NULL);
|
||||
break;
|
||||
case AKS_STATESAVEQUICK:
|
||||
case AKS_STATESAVEQUICK1:
|
||||
|
||||
7
main.cpp
7
main.cpp
@ -843,7 +843,7 @@ void uae_quit (void)
|
||||
}
|
||||
|
||||
/* 0 = normal, 1 = nogui, -1 = disable nogui, -2 = autorestart */
|
||||
void uae_restart (int opengui, const TCHAR *cfgfile)
|
||||
void uae_restart(struct uae_prefs *p, int opengui, const TCHAR *cfgfile)
|
||||
{
|
||||
uae_quit ();
|
||||
restart_program = opengui == -2 ? 4 : (opengui > 0 ? 1 : (opengui == 0 ? 2 : 3));
|
||||
@ -852,6 +852,9 @@ void uae_restart (int opengui, const TCHAR *cfgfile)
|
||||
if (cfgfile)
|
||||
_tcscpy (restart_config, cfgfile);
|
||||
target_restart ();
|
||||
p->gfx_apmode[0].gfx_fullscreen = GFX_WINDOW;
|
||||
p->gfx_apmode[1].gfx_fullscreen = GFX_WINDOW;
|
||||
|
||||
}
|
||||
|
||||
#ifndef DONT_PARSE_CMDLINE
|
||||
@ -1199,7 +1202,7 @@ static int real_main2 (int argc, TCHAR **argv)
|
||||
#ifdef NATMEM_OFFSET
|
||||
if (!init_shm ()) {
|
||||
if (currprefs.start_gui)
|
||||
uae_restart(-1, NULL);
|
||||
uae_restart(&currprefs, -1, NULL);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
16
memory.cpp
16
memory.cpp
@ -2850,17 +2850,17 @@ static void restore_roms(void)
|
||||
write_log (_T("Known ROM '%s' loaded\n"), rd->name);
|
||||
#if 1
|
||||
if ((rd->cpu & 8) && changed_prefs.cpu_model < 68030) {
|
||||
notify_user (NUMSG_KS68030PLUS);
|
||||
uae_restart (-1, NULL);
|
||||
notify_user(NUMSG_KS68030PLUS);
|
||||
uae_restart(&currprefs, -1, NULL);
|
||||
} else if ((rd->cpu & 3) == 3 && changed_prefs.cpu_model != 68030) {
|
||||
notify_user (NUMSG_KS68030);
|
||||
uae_restart (-1, NULL);
|
||||
notify_user(NUMSG_KS68030);
|
||||
uae_restart(&currprefs, -1, NULL);
|
||||
} else if ((rd->cpu & 3) == 1 && changed_prefs.cpu_model < 68020) {
|
||||
notify_user (NUMSG_KS68EC020);
|
||||
uae_restart (-1, NULL);
|
||||
notify_user(NUMSG_KS68EC020);
|
||||
uae_restart(&currprefs, -1, NULL);
|
||||
} else if ((rd->cpu & 3) == 2 && (changed_prefs.cpu_model < 68020 || changed_prefs.address_space_24)) {
|
||||
notify_user (NUMSG_KS68020);
|
||||
uae_restart (-1, NULL);
|
||||
notify_user(NUMSG_KS68020);
|
||||
uae_restart(&currprefs, -1, NULL);
|
||||
}
|
||||
#endif
|
||||
if (rd->cloanto)
|
||||
|
||||
@ -3803,7 +3803,7 @@ uae_u32 REGPARAM2 op_illg (uae_u32 opcode)
|
||||
if (opcode == 0x4E7B && inrom) {
|
||||
if (get_long (0x10) == 0) {
|
||||
notify_user (NUMSG_KS68020);
|
||||
uae_restart (-1, NULL);
|
||||
uae_restart(&currprefs, -1, NULL);
|
||||
m68k_setstopped(1);
|
||||
return 4;
|
||||
}
|
||||
|
||||
@ -6335,7 +6335,7 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct **co
|
||||
if (full_property_sheet) {
|
||||
inputdevice_updateconfig (NULL, &workprefs);
|
||||
} else {
|
||||
uae_restart (-1, *pcfgfile);
|
||||
uae_restart(&workprefs, -1, *pcfgfile);
|
||||
exit_gui(1);
|
||||
}
|
||||
}
|
||||
@ -6348,7 +6348,7 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct **co
|
||||
if (full_property_sheet) {
|
||||
inputdevice_updateconfig (NULL, &workprefs);
|
||||
} else {
|
||||
uae_restart (-1, *pcfgfile);
|
||||
uae_restart(&workprefs, -1, *pcfgfile);
|
||||
exit_gui(1);
|
||||
}
|
||||
}
|
||||
@ -6470,7 +6470,7 @@ static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA
|
||||
if (cfgfile) {
|
||||
ConfigToRegistry (config, configtypepanel);
|
||||
if (!full_property_sheet)
|
||||
uae_restart (0, cfgfile);
|
||||
uae_restart(&workprefs, 0, cfgfile);
|
||||
exit_gui (1);
|
||||
}
|
||||
}
|
||||
@ -22615,7 +22615,7 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
|
||||
if (!workprefs.start_gui)
|
||||
ret = 1;
|
||||
} else {
|
||||
uae_restart (workprefs.start_gui, file);
|
||||
uae_restart(&workprefs, workprefs.start_gui, file);
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
@ -23003,7 +23003,7 @@ static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
|
||||
}
|
||||
break;
|
||||
case IDC_RESETAMIGA:
|
||||
uae_reset (1, 1);
|
||||
uae_reset(1, 1);
|
||||
SendMessage (hDlg, WM_COMMAND, IDOK, 0);
|
||||
return TRUE;
|
||||
case IDC_QUITEMU:
|
||||
@ -23011,7 +23011,7 @@ static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
|
||||
SendMessage (hDlg, WM_COMMAND, IDCANCEL, 0);
|
||||
return TRUE;
|
||||
case IDC_RESTARTEMU:
|
||||
uae_restart (-1, NULL);
|
||||
uae_restart(&workprefs, -1, NULL);
|
||||
exit_gui (1);
|
||||
return TRUE;
|
||||
case IDHELP:
|
||||
@ -23642,7 +23642,7 @@ gui_exit:
|
||||
} else if (qs_request_reset && quickstart) {
|
||||
if (qs_request_reset & 4) {
|
||||
copy_prefs(&changed_prefs, &currprefs);
|
||||
uae_restart(-2, NULL);
|
||||
uae_restart(&workprefs, -2, NULL);
|
||||
} else {
|
||||
uae_reset((qs_request_reset & 2) ? 1 : 0, 1);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user