mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
When resetting Y, make sure we don't end up outside the screen. See #9563
This commit is contained in:
parent
0b7da0b6a4
commit
f18b1a5e8a
1 changed files with 4 additions and 2 deletions
|
@ -407,11 +407,13 @@ namespace MainWindow
|
|||
}
|
||||
|
||||
// Then center if necessary. One dimension at a time.
|
||||
// Max is to make sure that if we end up making the window bigger than the screen (which is not ideal), the top left
|
||||
// corner, and thus the menu etc, will be visible. Also potential workaround for #9563.
|
||||
if (resetPositionX) {
|
||||
g_Config.iWindowX = (currentScreenWidth - g_Config.iWindowWidth) / 2;
|
||||
g_Config.iWindowX = std::max(0, (currentScreenWidth - g_Config.iWindowWidth) / 2);
|
||||
}
|
||||
if (resetPositionY) {
|
||||
g_Config.iWindowY = (currentScreenHeight - g_Config.iWindowHeight) / 2;
|
||||
g_Config.iWindowY = std::max(0, (currentScreenHeight - g_Config.iWindowHeight) / 2);
|
||||
}
|
||||
|
||||
RECT rc;
|
||||
|
|
Loading…
Add table
Reference in a new issue