Skip to content

Commit d7d52e8

Browse files
xezonhelmutbuhler
andcommitted
[GEN][ZH] Fix missing OLDER REPLAY VERSION dialog when double clicking a replay to load (#984)
Co-authored-by: Helmut Buhler <buhler@8gadgetpack.net>
1 parent 4a723fd commit d7d52e8

File tree

2 files changed

+24
-8
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus

2 files changed

+24
-8
lines changed

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ WindowMsgHandledType ReplayMenuSystem( GameWindow *window, UnsignedInt msg,
475475
case GWM_INPUT_FOCUS:
476476
{
477477

478-
// if we're givin the opportunity to take the keyboard focus we must say we want it
478+
// if we're given the opportunity to take the keyboard focus we must say we want it
479479
if( mData1 == TRUE )
480480
*(Bool *)mData2 = TRUE;
481481

@@ -498,11 +498,19 @@ WindowMsgHandledType ReplayMenuSystem( GameWindow *window, UnsignedInt msg,
498498

499499
AsciiString asciiFilename;
500500
asciiFilename.translate(filename);
501-
TheRecorder->playbackFile(asciiFilename);
502501

503-
if(parentReplayMenu != NULL)
502+
if(TheRecorder->testVersionPlayback(asciiFilename))
504503
{
505-
parentReplayMenu->winHide(TRUE);
504+
MessageBoxOkCancel(TheGameText->fetch("GUI:OlderReplayVersionTitle"), TheGameText->fetch("GUI:OlderReplayVersion"),reallyLoadReplay ,NULL);
505+
}
506+
else
507+
{
508+
TheRecorder->playbackFile(asciiFilename);
509+
510+
if(parentReplayMenu != NULL)
511+
{
512+
parentReplayMenu->winHide(TRUE);
513+
}
506514
}
507515
}
508516
}

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ WindowMsgHandledType ReplayMenuSystem( GameWindow *window, UnsignedInt msg,
475475
case GWM_INPUT_FOCUS:
476476
{
477477

478-
// if we're givin the opportunity to take the keyboard focus we must say we want it
478+
// if we're given the opportunity to take the keyboard focus we must say we want it
479479
if( mData1 == TRUE )
480480
*(Bool *)mData2 = TRUE;
481481

@@ -498,11 +498,19 @@ WindowMsgHandledType ReplayMenuSystem( GameWindow *window, UnsignedInt msg,
498498

499499
AsciiString asciiFilename;
500500
asciiFilename.translate(filename);
501-
TheRecorder->playbackFile(asciiFilename);
502501

503-
if(parentReplayMenu != NULL)
502+
if(TheRecorder->testVersionPlayback(asciiFilename))
504503
{
505-
parentReplayMenu->winHide(TRUE);
504+
MessageBoxOkCancel(TheGameText->fetch("GUI:OlderReplayVersionTitle"), TheGameText->fetch("GUI:OlderReplayVersion"),reallyLoadReplay ,NULL);
505+
}
506+
else
507+
{
508+
TheRecorder->playbackFile(asciiFilename);
509+
510+
if(parentReplayMenu != NULL)
511+
{
512+
parentReplayMenu->winHide(TRUE);
513+
}
506514
}
507515
}
508516
}

0 commit comments

Comments
 (0)