SDL: added --inputdisplay

This commit is contained in:
shinydoofy 2009-03-22 19:26:28 +00:00
parent fd0753199e
commit dc244cddee
4 changed files with 21 additions and 0 deletions

View File

@ -1,4 +1,5 @@
---version 2.0.4 yet to be released--- ---version 2.0.4 yet to be released---
22-mar-2009 - shinydoofy - sdl - added hotkey I and --inputdisplay {0|1|2|4} for toggling input display.
22-mar-2009 - shinydoofy - sdl - added commandline options for sound channels' volumes 22-mar-2009 - shinydoofy - sdl - added commandline options for sound channels' volumes
22-mar-2009 - shinydoofy - sdl - updated window title 22-mar-2009 - shinydoofy - sdl - updated window title
19-mar-2009 - adelikat - Win32 - make Video - windowed mode - disable hardware accel the default setting. Made high quality sound the default setting. 19-mar-2009 - adelikat - Win32 - make Video - windowed mode - disable hardware accel the default setting. Made high quality sound the default setting.

View File

@ -183,6 +183,9 @@ InitConfig()
// allow for input configuration // allow for input configuration
config->addOption('i', "inputcfg", "SDL.InputCfg", InputCfg); config->addOption('i', "inputcfg", "SDL.InputCfg", InputCfg);
// display input
config->addOption("inputdisplay", "SDL.InputDisplay", 0);
// video playback // video playback
config->addOption("playmov", "SDL.Movie", ""); config->addOption("playmov", "SDL.Movie", "");
@ -296,6 +299,7 @@ InitConfig()
config->addOption(prefix + "DecreaseSpeed", SDLK_MINUS); config->addOption(prefix + "DecreaseSpeed", SDLK_MINUS);
config->addOption(prefix + "IncreaseSpeed", SDLK_EQUALS); config->addOption(prefix + "IncreaseSpeed", SDLK_EQUALS);
config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH); config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH);
config->addOption(prefix + "InputDisplay", SDLK_i);
//config->addOption(prefix + "Power", 0); //config->addOption(prefix + "Power", 0);

View File

@ -167,6 +167,7 @@ int stateKey[10];
int movieToggleFrameDisplayKey; int movieToggleFrameDisplayKey;
int lagCounterDisplayKey; int lagCounterDisplayKey;
int SubtitleDisplayKey; int SubtitleDisplayKey;
int InputDisplayKey;
// this function loads the sdl hotkeys from the config file into the // this function loads the sdl hotkeys from the config file into the
// global scope. this elimates the need for accessing the config file // global scope. this elimates the need for accessing the config file
@ -203,6 +204,7 @@ void setHotKeys()
g_config->getOption("SDL.Hotkeys.LagCounterDisplay", &lagCounterDisplayKey); g_config->getOption("SDL.Hotkeys.LagCounterDisplay", &lagCounterDisplayKey);
g_config->getOption("SDL.Hotkeys.MovieToggleFrameDisplay", &movieToggleFrameDisplayKey); g_config->getOption("SDL.Hotkeys.MovieToggleFrameDisplay", &movieToggleFrameDisplayKey);
g_config->getOption("SDL.Hotkeys.SubtitleDisplay", &SubtitleDisplayKey); g_config->getOption("SDL.Hotkeys.SubtitleDisplay", &SubtitleDisplayKey);
g_config->getOption("SDL.Hotkeys.InputDisplay", &InputDisplayKey);
/* /*
config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH); config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH);
config->addOption(prefix + "Power", 0); config->addOption(prefix + "Power", 0);
@ -409,6 +411,12 @@ KeyboardCommands()
FCEUI_MovieToggleFrameDisplay(); FCEUI_MovieToggleFrameDisplay();
} }
if(_keyonly(InputDisplayKey)) {
FCEUI_ToggleInputDisplay();
extern int input_display;
g_config->setOption("SDL.InputDisplay", input_display);
}
if(_keyonly(pauseKey)) { if(_keyonly(pauseKey)) {
FCEUI_ToggleEmulationPause(); FCEUI_ToggleEmulationPause();
} }

View File

@ -106,6 +106,7 @@ char *DriverUsage="\
Devices: quizking hypershot mahjong toprider ftrainer\n\ Devices: quizking hypershot mahjong toprider ftrainer\n\
familykeyboard oekakids arkanoid shadow bworld 4player\n\ familykeyboard oekakids arkanoid shadow bworld 4player\n\
--inputcfg d Configures input device d on startup.\n\ --inputcfg d Configures input device d on startup.\n\
--inputdisplay{0|1|2|4}Displays game input.\n\
--playmov f Plays back a recorded movie from filename f.\n\ --playmov f Plays back a recorded movie from filename f.\n\
--fcmconvert f Converts fcm movie file f to fm2."; --fcmconvert f Converts fcm movie file f to fm2.";
@ -584,6 +585,13 @@ SDL_GL_LoadLibrary(0);
} }
#endif #endif
{
int id;
g_config->getOption("SDL.InputDisplay", &id);
extern int input_display;
input_display = id;
}
// load the hotkeys from the config life // load the hotkeys from the config life
setHotKeys(); setHotKeys();