From d20005b7332d10ff8e130c3419d8ff3d44a3f5ff Mon Sep 17 00:00:00 2001 From: captainurist <73941350+captainurist@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:14:45 +0800 Subject: [PATCH] Disable video when starting a recording --- src/Engine/Components/Trace/EngineTracePlayer.cpp | 2 ++ src/Engine/Components/Trace/EngineTraceRecorder.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Engine/Components/Trace/EngineTracePlayer.cpp b/src/Engine/Components/Trace/EngineTracePlayer.cpp index ef2d50eb3670..7d0a4671ab5e 100644 --- a/src/Engine/Components/Trace/EngineTracePlayer.cpp +++ b/src/Engine/Components/Trace/EngineTracePlayer.cpp @@ -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); diff --git a/src/Engine/Components/Trace/EngineTraceRecorder.cpp b/src/Engine/Components/Trace/EngineTraceRecorder.cpp index 7ad81201fcdd..febd14e2e560 100644 --- a/src/Engine/Components/Trace/EngineTraceRecorder.cpp +++ b/src/Engine/Components/Trace/EngineTraceRecorder.cpp @@ -37,6 +37,8 @@ void EngineTraceRecorder::startRecording(EngineController *game, const std::stri _trace = std::make_unique(); 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();