Skip to content

Commit ee7cc0e

Browse files
authored
[GEN][ZH] Fix game halting when left Alt key is pressed (#837)
1 parent 4154e9e commit ee7cc0e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Generals/Code/Main/WinMain.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,12 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT message,
366366
// Prevent moving/sizing and power loss in fullscreen mode
367367
switch( wParam )
368368
{
369+
case SC_KEYMENU:
370+
// TheSuperHackers @bugfix Mauller 10/05/2025 Always handle this command to prevent halting the game when left Alt is pressed.
371+
return 1;
369372
case SC_MOVE:
370373
case SC_SIZE:
371374
case SC_MAXIMIZE:
372-
case SC_KEYMENU:
373375
case SC_MONITORPOWER:
374376
if( FALSE == ApplicationIsWindowed )
375377
return 1;

GeneralsMD/Code/Main/WinMain.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,12 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT message,
369369
// Prevent moving/sizing and power loss in fullscreen mode
370370
switch( wParam )
371371
{
372+
case SC_KEYMENU:
373+
// TheSuperHackers @bugfix Mauller 10/05/2025 Always handle this command to prevent halting the game when left Alt is pressed.
374+
return 1;
372375
case SC_MOVE:
373376
case SC_SIZE:
374377
case SC_MAXIMIZE:
375-
case SC_KEYMENU:
376378
case SC_MONITORPOWER:
377379
if( FALSE == ApplicationIsWindowed )
378380
return 1;

0 commit comments

Comments
 (0)