From 6ca3af34931ca022ac59eb2ecfae487330dc3f1f Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Tue, 15 Aug 2017 10:46:54 +0200 Subject: [PATCH] WIP: add F3 and F4 to control the recording It's not working properly, it's just a first try. --- src/event.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/event.cxx b/src/event.cxx index 9a6b7cb..e659c2d 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -2978,8 +2978,7 @@ CEvent::ChangePhase (Uint32 phase) if (phase == EV_PHASE_INIT) m_demoTime = 0; - if (phase == EV_PHASE_PLAY && !m_bDemoPlay && m_bStartRecording) - DemoRecStart (); // start recording + if (phase != EV_PHASE_PLAY) DemoRecStop (); // stop recording @@ -5237,6 +5236,16 @@ CEvent::TreatEventBase (const SDL_Event & event) m_pDecor->SetInfoMode (!m_pDecor->GetInfoMode ()); } return true; + case SDLK_F3: + if (m_phase == EV_PHASE_PLAY && !m_bDemoPlay && m_bStartRecording) + { + DemoRecStart (); // start recording + m_bStartRecording = true; + } + break; + case SDLK_F4: + m_bStartRecording = false; + break; case SDLK_F9: if (m_phase == EV_PHASE_PLAY) m_pDecor->MemoPos (0, !!(m_keymod & KMOD_CTRL));