Skip to content

Commit

Permalink
Merge branch 'master' into TemporaryHackishBranch
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaMoo committed Dec 25, 2017
2 parents cce6a56 + 4b04a6d commit 3b1b1bb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
6 changes: 6 additions & 0 deletions GPU/Debugger/Breakpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex> guard(breaksLock);

Expand Down
2 changes: 2 additions & 0 deletions GPU/Debugger/Breakpoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions UI/MiscScreens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
14 changes: 12 additions & 2 deletions Windows/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -379,6 +380,7 @@ namespace MainWindow

void Minimize() {
ShowWindow(hwndMain, SW_MINIMIZE);
InputDevice::LoseFocus();
}

RECT DetermineWindowRectangle() {
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
}
Expand Down Expand Up @@ -740,13 +746,17 @@ namespace MainWindow
} else if (!inResizeMove) {
HandleSizeChange(wParam);
}
if (hasFocus) {
InputDevice::GainFocus();
}
break;

case SIZE_MINIMIZED:
Core_NotifyWindowHidden(true);
if (!g_Config.bPauseWhenMinimized) {
NativeMessageReceived("window minimized", "true");
}
InputDevice::LoseFocus();
break;
default:
break;
Expand Down

0 comments on commit 3b1b1bb

Please sign in to comment.