From 207af398eb38a8eae5e86945fc3ba9dfee22f997 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Tue, 15 Aug 2017 17:38:39 +0200 Subject: [PATCH] Fix the recorder start and stop with F3 and F4 --- src/event.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/event.cxx b/src/event.cxx index 5e68584..a0221c1 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -5237,14 +5237,18 @@ CEvent::TreatEventBase (const SDL_Event & event) } return true; case SDLK_F3: - if (m_phase == EV_PHASE_PLAY && !m_bDemoPlay && m_bStartRecording) + if (m_phase == EV_PHASE_PLAY && !m_bDemoPlay && !m_bStartRecording) { DemoRecStart (); // start recording m_bStartRecording = true; } break; case SDLK_F4: - m_bStartRecording = false; + if (m_phase == EV_PHASE_PLAY && !m_bDemoPlay && m_bStartRecording) + { + DemoRecStop (); // stop recording + m_bStartRecording = false; + } break; case SDLK_F9: if (m_phase == EV_PHASE_PLAY)