mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 21:46:23 +02:00
Improve smallwindow detection, code cleanup.
This commit is contained in:
1 parent
d91f82604d
commit
0be02f6de0
5 files changed
+45
-30
No files matched your search
+1
-10
@@ -204,15 +204,6 @@ namespace MainWindow
|
||||
rcOuter.top = g_Config.iWindowY;
|
||||
}
|
||||
|
||||
static bool IsWindowSmall() {
|
||||
// Can't take this from config as it will not be set if windows is maximized.
|
||||
RECT rc;
|
||||
GetWindowRect(hwndMain, &rc);
|
||||
int width = (int)((rc.right - rc.left) * g_dpi_scale);
|
||||
int height = (int)((rc.bottom - rc.top) * g_dpi_scale);
|
||||
return g_Config.IsPortrait() ? (height < 480 + 80) : (width < 480 + 80);
|
||||
}
|
||||
|
||||
void SetWindowSize(int zoom) {
|
||||
AssertCurrentThreadName("Main");
|
||||
RECT rc, rcOuter;
|
||||
@@ -281,7 +272,7 @@ namespace MainWindow
|
||||
PSP_CoreParameter().pixelHeight = height;
|
||||
}
|
||||
|
||||
if (UpdateScreenScale(width, height, IsWindowSmall())) {
|
||||
if (UpdateScreenScale(width, height)) {
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user