Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(gameengine): open skirmish with a layout that has no record panel
Olcay Seygan7ee3ed4e9b48
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex bd1c68ef2..53a6f1b79 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -327,6 +327,7 @@ found and fixed, EA's own, not port damage.**- A vehicle a mod gives two passenger holds no longer crashes the game. The second hold took riders in where nothing else looked, so a passenger who died stayed aboard, and the next time the vehicle seated its riders it reached for him.- A network game or a replay on a map this machine cannot read goes back to the menu. It used to deal out the start positions as if the map had eight, while the machines that had it dealt over the map's own, and the game split from the first second.- A mod whose unit is switched on, held back or stripped by an upgrade the mod never defines no longer crashes the game as the map loads. The missing name is skipped and written to the log once, and the rest of the unit's upgrades work.+- A mod or an install folder carrying an older skirmish room screen, one without the match record panel, no longer crashes the game on the way into Skirmish. The room opens without the record and plays as before.## One interfacediff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cppindex 5027b75e8..189dd372e 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp@@ -1259,12 +1259,17 @@ void InitSkirmishGameGadgets( void )buttonRecordCloseID = NAMEKEY( "SkirmishGameOptionsMenu.wnd:ButtonRecordClose" );recordPopover = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, NAMEKEY( "SkirmishGameOptionsMenu.wnd:RecordPopover" ) );recordVeil = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, NAMEKEY( "SkirmishGameOptionsMenu.wnd:RecordVeil" ) );- recordPopover->winSetInputFunc( recordPopoverInput );- // Close's press goes to its parent, the record, which hands it up to the room; the layout gives- // the record no system callback, and the press died there- recordPopover->winSetSystemFunc( PassMessagesToParentSystem );- recordVeil->winSetInputFunc( recordVeilInput );- showRecord( FALSE );+ // a layout from before the record (retail's, or a mod's in the install folder) has neither, and+ // no Record button to open them+ if ( recordPopover )+ {+ recordPopover->winSetInputFunc( recordPopoverInput );+ // Close's press goes to its parent, the record, which hands it up to the room; the layout gives+ // the record no system callback, and the press died there+ recordPopover->winSetSystemFunc( PassMessagesToParentSystem );+ recordVeil->winSetInputFunc( recordVeilInput );+ showRecord( FALSE );+ }textEntryMapDisplay =TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, textEntryMapDisplayID );DEBUG_ASSERTCRASH(textEntryMapDisplay, ("Could not find the textEntryMapDisplay"));buttonReset = TheWindowManager->winGetWindowFromId( parentSkirmishGameOptions, buttonResetID );@@ -1761,7 +1766,7 @@ WindowMsgHandledType SkirmishGameOptionsMenuInput( GameWindow *window, UnsignedI// back/exit button//// an open record closes first- if( BitTest( state, KEY_STATE_UP ) && !recordPopover->winIsHidden() )+ if( BitTest( state, KEY_STATE_UP ) && recordPopover && !recordPopover->winIsHidden() )showRecord( FALSE );else if( BitTest( state, KEY_STATE_UP ) ){