diff --git a/GPU/Debugger/Breakpoints.cpp b/GPU/Debugger/Breakpoints.cpp index 1e1effafc6..401acbcdd7 100644 --- a/GPU/Debugger/Breakpoints.cpp +++ b/GPU/Debugger/Breakpoints.cpp @@ -322,6 +322,12 @@ void AddTextureChangeTempBreakpoint() { textureChangeTemp = true; } +void AddAnyTempBreakpoint() { + for (int i = 0; i < 256; ++i) { + AddCmdBreakpoint(i, true); + } +} + void RemoveAddressBreakpoint(u32 addr) { std::lock_guard guard(breaksLock); diff --git a/GPU/Debugger/Breakpoints.h b/GPU/Debugger/Breakpoints.h index 282b325dd2..5a5ecb1570 100644 --- a/GPU/Debugger/Breakpoints.h +++ b/GPU/Debugger/Breakpoints.h @@ -38,6 +38,8 @@ namespace GPUBreakpoints { void AddTextureBreakpoint(u32 addr, bool temp = false); void AddTextureChangeTempBreakpoint(); void AddRenderTargetBreakpoint(u32 addr, bool temp = false); + // Quick way to trigger GE debugger statically. + void AddAnyTempBreakpoint(); void RemoveAddressBreakpoint(u32 addr); void RemoveCmdBreakpoint(u8 cmd); diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 6f24d1cbb6..577e1cedd6 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -501,8 +501,8 @@ void LogoScreen::render() { #if (defined(_WIN32) && !PPSSPP_PLATFORM(UWP)) || PPSSPP_PLATFORM(ANDROID) // Draw the graphics API, except on UWP where it's always D3D11 - const char *apiName = gr->T(screenManager()->getDrawContext()->GetInfoString(InfoField::APINAME)); - dc.DrawText(apiName, bounds.centerX(), ppsspp_org_y + 50, textColor, ALIGN_CENTER); + std::string apiName = screenManager()->getDrawContext()->GetInfoString(InfoField::APINAME); + dc.DrawText(gr->T(apiName), bounds.centerX(), ppsspp_org_y + 50, textColor, ALIGN_CENTER); #endif dc.End(); diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index 95edbb155f..61a1950002 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -116,6 +116,7 @@ namespace MainWindow static bool g_IgnoreWM_SIZE = false; static bool inFullscreenResize = false; static bool inResizeMove = false; + static bool hasFocus = true; // gross hack bool noFocusPause = false; // TOGGLE_PAUSE state to override pause on lost focus @@ -379,6 +380,7 @@ namespace MainWindow void Minimize() { ShowWindow(hwndMain, SW_MINIMIZE); + InputDevice::LoseFocus(); } RECT DetermineWindowRectangle() { @@ -688,7 +690,9 @@ namespace MainWindow bool pause = true; if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) { WindowsRawInput::GainFocus(); - InputDevice::GainFocus(); + if (!IsIconic(GetHWND())) { + InputDevice::GainFocus(); + } g_activeWindow = WINDOW_MAINWINDOW; pause = false; } @@ -701,14 +705,16 @@ namespace MainWindow } } - if (wParam == WA_ACTIVE) { + if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) { NativeMessageReceived("got_focus", ""); + hasFocus = true; trapMouse = true; } if (wParam == WA_INACTIVE) { NativeMessageReceived("lost_focus", ""); WindowsRawInput::LoseFocus(); InputDevice::LoseFocus(); + hasFocus = false; trapMouse = false; } } @@ -740,6 +746,9 @@ namespace MainWindow } else if (!inResizeMove) { HandleSizeChange(wParam); } + if (hasFocus) { + InputDevice::GainFocus(); + } break; case SIZE_MINIMIZED: @@ -747,6 +756,7 @@ namespace MainWindow if (!g_Config.bPauseWhenMinimized) { NativeMessageReceived("window minimized", "true"); } + InputDevice::LoseFocus(); break; default: break;