From 60fe20142e01170ee4c7a891b44ddddaaa58c99a Mon Sep 17 00:00:00 2001 From: shinydoofy Date: Sun, 23 Nov 2008 22:29:02 +0000 Subject: [PATCH] movie subtitle toggle for SDL --- changelog.txt | 1 + src/drivers/sdl/config.cpp | 1 + src/drivers/sdl/input.cpp | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/changelog.txt b/changelog.txt index 9d257da3..82e237c9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ ---version 2.0.4 yet to be released--- +23-nov-2008 - shinydoofy - movie subs now have a toggle button in the SDL build (F10 by default) 23-nov-2008 - adelikat - movie subtitle system installed 22-nov-2008 - adelikat - win32 - added help menu item to TASEdit and Hex Editor, Minor TASEdit clean up 22-nov-2008 - adelikat - win32 - fixed so that turbo works with VBlank sync settings diff --git a/src/drivers/sdl/config.cpp b/src/drivers/sdl/config.cpp index 58e9fac2..826b81ee 100644 --- a/src/drivers/sdl/config.cpp +++ b/src/drivers/sdl/config.cpp @@ -289,6 +289,7 @@ InitConfig() config->addOption(prefix + "BindState", SDLK_F2); config->addOption(prefix + "FrameAdvanceLagSkip", SDLK_F6); config->addOption(prefix + "LagCounterDisplay", SDLK_F8); + config->addOption(prefix + "SubtitleDisplay", SDLK_F10); config->addOption(prefix + "SelectState0", SDLK_0); config->addOption(prefix + "SelectState1", SDLK_1); config->addOption(prefix + "SelectState2", SDLK_2); diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index 004c4057..dff9a7de 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -166,6 +166,7 @@ int quitKey; int stateKey[10]; int movieToggleFrameDisplayKey; int lagCounterDisplayKey; +int SubtitleDisplayKey; // this function loads the sdl hotkeys from the config file into the // global scope. this elimates the need for accessing the config file @@ -201,6 +202,7 @@ void setHotKeys() g_config->getOption("SDL.Hotkeys.SelectState9", &stateKey[9]); g_config->getOption("SDL.Hotkeys.LagCounterDisplay", &lagCounterDisplayKey); g_config->getOption("SDL.Hotkeys.MovieToggleFrameDisplay", &movieToggleFrameDisplayKey); + g_config->getOption("SDL.Hotkeys.SubtitleDisplay", &SubtitleDisplayKey); /* config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH); config->addOption(prefix + "Power", 0); @@ -459,6 +461,13 @@ KeyboardCommands() if(_keyonly(lagCounterDisplayKey)) { lagCounterDisplay ^= 1; } + + if (_keyonly(SubtitleDisplayKey)) { + extern int movieSubtitles; + movieSubtitles ^= 1; + FCEUI_DispMessage("Movie subtitles o%s.", + movieSubtitles ? "n" : "ff"); + } // VS Unisystem games if(gametype == GIT_VSUNI) {