make sure we got move+close menu items

This commit is contained in:
FunkyFr3sh 2024-05-29 04:28:05 +02:00
parent 0b29eb3d0e
commit 4de6eee162
4 changed files with 8 additions and 18 deletions

View file

@ -534,6 +534,13 @@ BOOL WINAPI fake_ShowWindow(HWND hWnd, int nCmdShow)
{
if (g_ddraw.ref && g_ddraw.hwnd == hWnd)
{
/* Make sure we got close/move menu items (Almost all of the The Learning Company games) */
HMENU menu = GetSystemMenu(hWnd, FALSE);
if (!menu || GetMenuState(menu, SC_CLOSE, MF_BYCOMMAND) == -1 || GetMenuState(menu, SC_MOVE, MF_BYCOMMAND) == -1)
{
GetSystemMenu(hWnd, TRUE);
}
if (nCmdShow == SW_SHOWMAXIMIZED)
nCmdShow = SW_SHOWNORMAL;