Don't use partial-restart unless debugger is present.
Works around #9666 for most practical purposes.
This commit is contained in:
parent
6e66f443e6
commit
a1e3be445a
6 changed files with 47 additions and 17 deletions
|
@ -495,6 +495,9 @@ static ConfigSetting graphicsSettings[] = {
|
||||||
ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true),
|
ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true),
|
||||||
ConfigSetting("FrameRate", &g_Config.iFpsLimit, 0, true, true),
|
ConfigSetting("FrameRate", &g_Config.iFpsLimit, 0, true, true),
|
||||||
ConfigSetting("FrameSkipUnthrottle", &g_Config.bFrameSkipUnthrottle, &DefaultFrameskipUnthrottle, true, false),
|
ConfigSetting("FrameSkipUnthrottle", &g_Config.bFrameSkipUnthrottle, &DefaultFrameskipUnthrottle, true, false),
|
||||||
|
#if defined(USING_WIN_UI)
|
||||||
|
ConfigSetting("RestartRequired", &g_Config.bRestartRequired, false, false),
|
||||||
|
#endif
|
||||||
ReportedConfigSetting("ForceMaxEmulatedFPS", &g_Config.iForceMaxEmulatedFPS, 60, true, true),
|
ReportedConfigSetting("ForceMaxEmulatedFPS", &g_Config.iForceMaxEmulatedFPS, 60, true, true),
|
||||||
|
|
||||||
// TODO: Hm, on fast mobile GPUs we should definitely default to at least 4 (setting = 2)...
|
// TODO: Hm, on fast mobile GPUs we should definitely default to at least 4 (setting = 2)...
|
||||||
|
|
|
@ -113,6 +113,7 @@ public:
|
||||||
bool bTopMost;
|
bool bTopMost;
|
||||||
std::string sFont;
|
std::string sFont;
|
||||||
bool bIgnoreWindowsKey;
|
bool bIgnoreWindowsKey;
|
||||||
|
bool bRestartRequired;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool bPauseWhenMinimized;
|
bool bPauseWhenMinimized;
|
||||||
|
|
|
@ -360,6 +360,12 @@ void SystemInfoScreen::CreateViews() {
|
||||||
deviceSpecs->Add(new InfoItem("Name", System_GetProperty(SYSPROP_NAME)));
|
deviceSpecs->Add(new InfoItem("Name", System_GetProperty(SYSPROP_NAME)));
|
||||||
deviceSpecs->Add(new InfoItem("Lang/Region", System_GetProperty(SYSPROP_LANGREGION)));
|
deviceSpecs->Add(new InfoItem("Lang/Region", System_GetProperty(SYSPROP_LANGREGION)));
|
||||||
deviceSpecs->Add(new InfoItem("ABI", GetCompilerABI()));
|
deviceSpecs->Add(new InfoItem("ABI", GetCompilerABI()));
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (IsDebuggerPresent()) {
|
||||||
|
deviceSpecs->Add(new InfoItem("Debugger Present", "Yes"));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
deviceSpecs->Add(new ItemHeader("CPU Information"));
|
deviceSpecs->Add(new ItemHeader("CPU Information"));
|
||||||
deviceSpecs->Add(new InfoItem("Name", cpu_info.brand_string));
|
deviceSpecs->Add(new InfoItem("Name", cpu_info.brand_string));
|
||||||
#if defined(ARM) || defined(ARM64) || defined(MIPS)
|
#if defined(ARM) || defined(ARM64) || defined(MIPS)
|
||||||
|
|
|
@ -566,6 +566,15 @@ namespace MainWindow {
|
||||||
NativeMessageReceived("gpu_resized", "");
|
NativeMessageReceived("gpu_resized", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void RestartApp() {
|
||||||
|
if (IsDebuggerPresent()) {
|
||||||
|
PostMessage(MainWindow::GetHWND(), WM_USER_RESTART_EMUTHREAD, 0, 0);
|
||||||
|
} else {
|
||||||
|
g_Config.bRestartRequired = true;
|
||||||
|
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindowMenu_Process(HWND hWnd, WPARAM wParam) {
|
void MainWindowMenu_Process(HWND hWnd, WPARAM wParam) {
|
||||||
std::string fn;
|
std::string fn;
|
||||||
|
|
||||||
|
@ -770,22 +779,22 @@ namespace MainWindow {
|
||||||
|
|
||||||
case ID_OPTIONS_DIRECT3D9:
|
case ID_OPTIONS_DIRECT3D9:
|
||||||
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D9;
|
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D9;
|
||||||
PostMessage(MainWindow::GetHWND(), WM_USER_RESTART_EMUTHREAD, 0, 0);
|
RestartApp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_OPTIONS_DIRECT3D11:
|
case ID_OPTIONS_DIRECT3D11:
|
||||||
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D11;
|
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D11;
|
||||||
PostMessage(MainWindow::GetHWND(), WM_USER_RESTART_EMUTHREAD, 0, 0);
|
RestartApp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_OPTIONS_OPENGL:
|
case ID_OPTIONS_OPENGL:
|
||||||
g_Config.iGPUBackend = GPU_BACKEND_OPENGL;
|
g_Config.iGPUBackend = GPU_BACKEND_OPENGL;
|
||||||
PostMessage(MainWindow::GetHWND(), WM_USER_RESTART_EMUTHREAD, 0, 0);
|
RestartApp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_OPTIONS_VULKAN:
|
case ID_OPTIONS_VULKAN:
|
||||||
g_Config.iGPUBackend = GPU_BACKEND_VULKAN;
|
g_Config.iGPUBackend = GPU_BACKEND_VULKAN;
|
||||||
PostMessage(MainWindow::GetHWND(), WM_USER_RESTART_EMUTHREAD, 0, 0);
|
RestartApp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_OPTIONS_NONBUFFEREDRENDERING: setRenderingMode(FB_NON_BUFFERED_MODE); break;
|
case ID_OPTIONS_NONBUFFEREDRENDERING: setRenderingMode(FB_NON_BUFFERED_MODE); break;
|
||||||
|
|
|
@ -242,7 +242,12 @@ void System_SendMessage(const char *command, const char *parameter) {
|
||||||
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(command, "graphics_restart")) {
|
} else if (!strcmp(command, "graphics_restart")) {
|
||||||
|
if (IsDebuggerPresent()) {
|
||||||
PostMessage(MainWindow::GetHWND(), MainWindow::WM_USER_RESTART_EMUTHREAD, 0, 0);
|
PostMessage(MainWindow::GetHWND(), MainWindow::WM_USER_RESTART_EMUTHREAD, 0, 0);
|
||||||
|
} else {
|
||||||
|
g_Config.bRestartRequired = true;
|
||||||
|
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
||||||
|
}
|
||||||
} else if (!strcmp(command, "setclipboardtext")) {
|
} else if (!strcmp(command, "setclipboardtext")) {
|
||||||
if (OpenClipboard(MainWindow::GetDisplayHWND())) {
|
if (OpenClipboard(MainWindow::GetDisplayHWND())) {
|
||||||
std::wstring data = ConvertUTF8ToWString(parameter);
|
std::wstring data = ConvertUTF8ToWString(parameter);
|
||||||
|
@ -575,6 +580,10 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||||
|
|
||||||
LogManager::Shutdown();
|
LogManager::Shutdown();
|
||||||
|
|
||||||
|
if (g_Config.bRestartRequired) {
|
||||||
|
W32Util::ExitAndRestart();
|
||||||
|
}
|
||||||
|
|
||||||
net::Shutdown();
|
net::Shutdown();
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
|
|
||||||
|
|
|
@ -922,6 +922,7 @@ void VKContext::SetScissorRect(int left, int top, int width, int height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VKContext::SetViewports(int count, Viewport *viewports) {
|
void VKContext::SetViewports(int count, Viewport *viewports) {
|
||||||
|
if (count > 0) {
|
||||||
viewport_.x = viewports[0].TopLeftX;
|
viewport_.x = viewports[0].TopLeftX;
|
||||||
viewport_.y = viewports[0].TopLeftY;
|
viewport_.y = viewports[0].TopLeftY;
|
||||||
viewport_.width = viewports[0].Width;
|
viewport_.width = viewports[0].Width;
|
||||||
|
@ -929,6 +930,7 @@ void VKContext::SetViewports(int count, Viewport *viewports) {
|
||||||
viewport_.minDepth = viewports[0].MinDepth;
|
viewport_.minDepth = viewports[0].MinDepth;
|
||||||
viewport_.maxDepth = viewports[0].MaxDepth;
|
viewport_.maxDepth = viewports[0].MaxDepth;
|
||||||
viewportDirty_ = true;
|
viewportDirty_ = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VKContext::SetBlendFactor(float color[4]) {
|
void VKContext::SetBlendFactor(float color[4]) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue