Skip to content

Commit 9fff13d

Browse files
committed
tweak: Add placeholder option setting
1 parent a57348d commit 9fff13d

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

Generals/Code/GameEngine/Include/Common/Recorder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class RecorderClass : public SubsystemInterface {
134134
Bool sawCRCMismatch() const;
135135
void cleanUpReplayFile( void ); ///< after a crash, send replay/debug info to a central repository
136136

137+
void setArchiveEnabled(Bool enable) { m_archiveReplays = enable; } ///< Enable or disable replay archiving.
137138
void stopRecording(); ///< Stop recording and close m_file.
138139
protected:
139140
void startRecording(GameDifficulty diff, Int originalGameMode, Int rankPoints, Int maxFPS); ///< Start recording to m_file.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "Common/GameEngine.h"
3939
#include "Common/UserPreferences.h"
4040
#include "Common/GameLOD.h"
41+
#include "Common/Recorder.h"
4142
#include "Common/Registry.h"
4243
#include "Common/version.h"
4344

@@ -1308,6 +1309,13 @@ static void saveOptions( void )
13081309
TheWritableGlobalData->m_enablePlayerObserver = enabled;
13091310
}
13101311

1312+
// TheSuperHackers @todo Add checkbox ?
1313+
{
1314+
Bool enabled = pref->getArchiveReplaysEnabled();
1315+
(*pref)["ArchiveReplays"] = enabled ? "yes" : "no";
1316+
TheRecorder->setArchiveEnabled(enabled);
1317+
}
1318+
13111319
//-------------------------------------------------------------------------------------------------
13121320
// scroll speed val
13131321
val = GadgetSliderGetPosition(sliderScrollSpeed);

GeneralsMD/Code/GameEngine/Include/Common/Recorder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class RecorderClass : public SubsystemInterface {
134134
Bool sawCRCMismatch() const;
135135
void cleanUpReplayFile( void ); ///< after a crash, send replay/debug info to a central repository
136136

137+
void setArchiveEnabled(Bool enable) { m_archiveReplays = enable; } ///< Enable or disable replay archiving.
137138
void stopRecording(); ///< Stop recording and close m_file.
138139
protected:
139140
void startRecording(GameDifficulty diff, Int originalGameMode, Int rankPoints, Int maxFPS); ///< Start recording to m_file.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "Common/GameEngine.h"
3939
#include "Common/UserPreferences.h"
4040
#include "Common/GameLOD.h"
41+
#include "Common/Recorder.h"
4142
#include "Common/Registry.h"
4243
#include "Common/version.h"
4344

@@ -1368,6 +1369,13 @@ static void saveOptions( void )
13681369
TheWritableGlobalData->m_enablePlayerObserver = enabled;
13691370
}
13701371

1372+
// TheSuperHackers @todo Add checkbox ?
1373+
{
1374+
Bool enabled = pref->getArchiveReplaysEnabled();
1375+
(*pref)["ArchiveReplays"] = enabled ? "yes" : "no";
1376+
TheRecorder->setArchiveEnabled(enabled);
1377+
}
1378+
13711379
//-------------------------------------------------------------------------------------------------
13721380
// scroll speed val
13731381
val = GadgetSliderGetPosition(sliderScrollSpeed);

0 commit comments

Comments
 (0)