fix fullscreen horizontal-lcd mode display rectangle calculation to correct aspect ratio
This commit is contained in:
parent
54626689cf
commit
edbfa51bae
|
@ -1051,8 +1051,9 @@ void UpdateWndRects(HWND hwnd)
|
||||||
wndWidth = (rc.bottom - rc.top) - tbheight;
|
wndWidth = (rc.bottom - rc.top) - tbheight;
|
||||||
wndHeight = (rc.right - rc.left);
|
wndHeight = (rc.right - rc.left);
|
||||||
|
|
||||||
ratio = ((float)wndHeight / (float)defHeight);
|
ratio = ((float)wndHeight / (float)512);
|
||||||
oneScreenHeight = (int)((video.height/2) * ratio);
|
oneScreenHeight = (int)((256) * ratio);
|
||||||
|
int oneScreenWidth = (int)((192) * ratio);
|
||||||
|
|
||||||
// Main screen
|
// Main screen
|
||||||
ptClient.x = rc.left;
|
ptClient.x = rc.left;
|
||||||
|
@ -1061,7 +1062,7 @@ void UpdateWndRects(HWND hwnd)
|
||||||
MainScreenRect.left = ptClient.x;
|
MainScreenRect.left = ptClient.x;
|
||||||
MainScreenRect.top = ptClient.y;
|
MainScreenRect.top = ptClient.y;
|
||||||
ptClient.x = (rc.left + oneScreenHeight);
|
ptClient.x = (rc.left + oneScreenHeight);
|
||||||
ptClient.y = (rc.top + wndWidth);
|
ptClient.y = (rc.top + oneScreenWidth);
|
||||||
ClientToScreen(hwnd, &ptClient);
|
ClientToScreen(hwnd, &ptClient);
|
||||||
MainScreenRect.right = ptClient.x;
|
MainScreenRect.right = ptClient.x;
|
||||||
MainScreenRect.bottom = ptClient.y;
|
MainScreenRect.bottom = ptClient.y;
|
||||||
|
@ -1073,7 +1074,7 @@ void UpdateWndRects(HWND hwnd)
|
||||||
SubScreenRect.left = ptClient.x;
|
SubScreenRect.left = ptClient.x;
|
||||||
SubScreenRect.top = ptClient.y;
|
SubScreenRect.top = ptClient.y;
|
||||||
ptClient.x = (rc.left + oneScreenHeight + oneScreenHeight);
|
ptClient.x = (rc.left + oneScreenHeight + oneScreenHeight);
|
||||||
ptClient.y = (rc.top + wndWidth);
|
ptClient.y = (rc.top + oneScreenWidth);
|
||||||
ClientToScreen(hwnd, &ptClient);
|
ClientToScreen(hwnd, &ptClient);
|
||||||
SubScreenRect.right = ptClient.x;
|
SubScreenRect.right = ptClient.x;
|
||||||
SubScreenRect.bottom = ptClient.y;
|
SubScreenRect.bottom = ptClient.y;
|
||||||
|
|
Loading…
Reference in New Issue