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);
uae_reset (1, 1);
break;
case AKS_RESTART:
- uae_restart(-1, NULL);
+ uae_restart(&currprefs, -1, NULL);
break;
case AKS_STATESAVEQUICK:
case AKS_STATESAVEQUICK1:
}
/* 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));
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
#ifdef NATMEM_OFFSET
if (!init_shm ()) {
if (currprefs.start_gui)
- uae_restart(-1, NULL);
+ uae_restart(&currprefs, -1, NULL);
return 0;
}
#endif
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)
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;
}
if (full_property_sheet) {
inputdevice_updateconfig (NULL, &workprefs);
} else {
- uae_restart (-1, *pcfgfile);
+ uae_restart(&workprefs, -1, *pcfgfile);
exit_gui(1);
}
}
if (full_property_sheet) {
inputdevice_updateconfig (NULL, &workprefs);
} else {
- uae_restart (-1, *pcfgfile);
+ uae_restart(&workprefs, -1, *pcfgfile);
exit_gui(1);
}
}
if (cfgfile) {
ConfigToRegistry (config, configtypepanel);
if (!full_property_sheet)
- uae_restart (0, cfgfile);
+ uae_restart(&workprefs, 0, cfgfile);
exit_gui (1);
}
}
if (!workprefs.start_gui)
ret = 1;
} else {
- uae_restart (workprefs.start_gui, file);
+ uae_restart(&workprefs, workprefs.start_gui, file);
ret = 1;
}
}
}
break;
case IDC_RESETAMIGA:
- uae_reset (1, 1);
+ uae_reset(1, 1);
SendMessage (hDlg, WM_COMMAND, IDOK, 0);
return TRUE;
case IDC_QUITEMU:
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:
} 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);
}