mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-06 20:55:23 +02:00
Remove more bad uses of dp_xres. Fix a data flow issue
(could end up with "feedback" if modifying the screen bounds)
This commit is contained in:
@@ -210,6 +210,7 @@ namespace MainWindow
|
||||
}
|
||||
|
||||
void ResizeDisplay(bool displayOSM = true, bool noWindowMovement = false) {
|
||||
int width = PSP_CoreParameter().pixelWidth, height = PSP_CoreParameter().pixelHeight;
|
||||
RECT rc;
|
||||
GetClientRect(hwndMain, &rc);
|
||||
if (!noWindowMovement) {
|
||||
@@ -217,9 +218,10 @@ namespace MainWindow
|
||||
(rc.bottom - rc.top) == PSP_CoreParameter().pixelHeight)
|
||||
return;
|
||||
|
||||
PSP_CoreParameter().pixelWidth = rc.right - rc.left;
|
||||
PSP_CoreParameter().pixelHeight = rc.bottom - rc.top;
|
||||
MoveWindow(hwndDisplay, 0, 0, PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight, TRUE);
|
||||
width = rc.right - rc.left;
|
||||
height = rc.bottom - rc.top;
|
||||
// Moves the internal window, not the frame. TODO: Get rid of the internal window.
|
||||
MoveWindow(hwndDisplay, 0, 0, width, height, TRUE);
|
||||
}
|
||||
|
||||
// Round up to a zoom factor for the render size.
|
||||
@@ -227,6 +229,7 @@ namespace MainWindow
|
||||
if (zoom == 0) // auto mode
|
||||
zoom = (rc.right - rc.left + 479) / 480;
|
||||
|
||||
// Actually, auto mode should be more granular...
|
||||
PSP_CoreParameter().renderWidth = 480 * zoom;
|
||||
PSP_CoreParameter().renderHeight = 272 * zoom;
|
||||
|
||||
@@ -239,6 +242,7 @@ namespace MainWindow
|
||||
osm.Show(g->T(message), 2.0f);
|
||||
}
|
||||
|
||||
UpdateScreenScale(width, height);
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user