mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
fix resizing on windows, should account for menu size correctly now
This commit is contained in:
parent
ee50f9eed6
commit
fe5b4e90fb
@ -610,8 +610,8 @@ static bool gfx_ctx_wgl_set_video_mode(void *data,
|
|||||||
rect.right = width;
|
rect.right = width;
|
||||||
rect.bottom = height;
|
rect.bottom = height;
|
||||||
AdjustWindowRect(&rect, style, FALSE);
|
AdjustWindowRect(&rect, style, FALSE);
|
||||||
width = rect.right - rect.left;
|
g_resize_width = width = rect.right - rect.left;
|
||||||
height = rect.bottom - rect.top;
|
g_resize_height = height = rect.bottom - rect.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hwnd = CreateWindowEx(0, "RetroArch", "RetroArch", style,
|
g_hwnd = CreateWindowEx(0, "RetroArch", "RetroArch", style,
|
||||||
@ -626,13 +626,13 @@ static bool gfx_ctx_wgl_set_video_mode(void *data,
|
|||||||
if (!fullscreen || windowed_full)
|
if (!fullscreen || windowed_full)
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
if (!fullscreen)
|
||||||
{
|
{
|
||||||
RECT rc_temp = {0, 0, g_resize_height, 0x7FFF};
|
RECT rc_temp = {0, 0, height, 0x7FFF};
|
||||||
SetMenu(g_hwnd, LoadMenu(GetModuleHandle(NULL),MAKEINTRESOURCE(IDR_MENU)));
|
SetMenu(g_hwnd, LoadMenu(GetModuleHandle(NULL),MAKEINTRESOURCE(IDR_MENU)));
|
||||||
SendMessage(g_hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rc_temp);
|
SendMessage(g_hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rc_temp);
|
||||||
g_resize_height += rc_temp.top + rect.top;
|
g_resize_height = height += rc_temp.top + rect.top;
|
||||||
SetWindowPos(g_hwnd, NULL, 0, 0, g_resize_width, g_resize_height, SWP_NOMOVE);
|
SetWindowPos(g_hwnd, NULL, 0, 0, width, height, SWP_NOMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowWindow(g_hwnd, SW_RESTORE);
|
ShowWindow(g_hwnd, SW_RESTORE);
|
||||||
UpdateWindow(g_hwnd);
|
UpdateWindow(g_hwnd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user