From 48a9428abcf4d5d4c8d1e93575c58c2a3db14a97 Mon Sep 17 00:00:00 2001 From: shinydoofy Date: Sat, 28 Mar 2009 22:15:53 +0000 Subject: [PATCH] SDL: hotkey Del to toggle --mute for avi capturing --- changelog.txt | 1 + src/drivers/sdl/config.cpp | 1 + src/drivers/sdl/input.cpp | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/changelog.txt b/changelog.txt index cd8ab509..cd0f4764 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ ---version 2.0.4 yet to be released--- +28-mar-2009 - shinydoofy - sdl - added hotkey Del to toggle mute avi capturing 28-mar-2009 - shinydoofy - sdl - fix fm2 playback and fcm->fm2 conversion crash at the cost of ugly 0x00 bytes behind the author's comment line 28-mar-2009 - adelikat - Lua - added FCEU.poweron() and FCEU.softreset() 27-mar-2009 - shinydoofy - sdl - added --no-config diff --git a/src/drivers/sdl/config.cpp b/src/drivers/sdl/config.cpp index 5576bfd1..5e7b5420 100644 --- a/src/drivers/sdl/config.cpp +++ b/src/drivers/sdl/config.cpp @@ -303,6 +303,7 @@ InitConfig() config->addOption(prefix + "IncreaseSpeed", SDLK_EQUALS); config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH); config->addOption(prefix + "InputDisplay", SDLK_i); + config->addOption(prefix + "MuteCapture", SDLK_DELETE); config->addOption(prefix + "Quit", SDLK_ESCAPE); //config->addOption(prefix + "Power", 0); diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index 9e192d07..04a81dea 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -168,6 +168,7 @@ int movieToggleFrameDisplayKey; int lagCounterDisplayKey; int SubtitleDisplayKey; int InputDisplayKey; +int MuteCaptureKey; // this function loads the sdl hotkeys from the config file into the // global scope. this elimates the need for accessing the config file @@ -205,6 +206,7 @@ void setHotKeys() g_config->getOption("SDL.Hotkeys.MovieToggleFrameDisplay", &movieToggleFrameDisplayKey); g_config->getOption("SDL.Hotkeys.SubtitleDisplay", &SubtitleDisplayKey); g_config->getOption("SDL.Hotkeys.InputDisplay", &InputDisplayKey); + g_config->getOption("SDL.Hotkeys.MuteCapture", &MuteCaptureKey); /* config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH); config->addOption(prefix + "Power", 0); @@ -416,6 +418,11 @@ KeyboardCommands() extern int input_display; g_config->setOption("SDL.InputDisplay", input_display); } + + if(_keyonly(MuteCaptureKey)) { + extern int mutecapture; + mutecapture ^= 1; + } if(_keyonly(pauseKey)) { FCEUI_ToggleEmulationPause();