From 932df7e6a34be82f7026ae404a7b56fb808b4e9c Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 11 Oct 2020 14:04:07 +0900 Subject: [PATCH] Windows: Adjust window size after adding menubar --- src/win/nact_win.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/win/nact_win.cpp b/src/win/nact_win.cpp index 5cbe393..1b745c5 100644 --- a/src/win/nact_win.cpp +++ b/src/win/nact_win.cpp @@ -22,6 +22,8 @@ void init_menu() HINSTANCE hinst = (HINSTANCE)GetModuleHandle(NULL); HMENU hmenu = LoadMenu(hinst, MAKEINTRESOURCE(IDR_MENU1)); SetMenu(get_hwnd(g_window), hmenu); + // Let SDL recalc the window size, taking menu height into account. + SDL_SetWindowSize(g_window, 640, 400); } void init_console(int sys_ver)