Skip to content

Commit

Permalink
Disable video when starting a recording
Browse files Browse the repository at this point in the history
  • Loading branch information
captainurist committed Sep 19, 2023
1 parent 0c35ec9 commit d20005b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Engine/Components/Trace/EngineTracePlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ void EngineTracePlayer::playTrace(EngineController *game, const std::string &sav
checkSaveFileSize(_trace->header.saveFileSize);

game->resizeWindow(640, 480);
engine->config->window.MouseGrab.setValue(false);
engine->config->debug.NoVideo.setValue(true);
game->tick();

EngineTraceStateAccessor::patchConfig(engine->config.get(), _trace->header.config);
Expand Down
2 changes: 2 additions & 0 deletions src/Engine/Components/Trace/EngineTraceRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ void EngineTraceRecorder::startRecording(EngineController *game, const std::stri
_trace = std::make_unique<EventTrace>();

game->resizeWindow(640, 480);
engine->config->window.MouseGrab.setValue(false); // TODO(captainurist): move all of this, including resetForTest(), into a single place.
engine->config->debug.NoVideo.setValue(true);
game->tick();

int frameTimeMs = engine->config->debug.TraceFrameTimeMs.value();
Expand Down

0 comments on commit d20005b

Please sign in to comment.