SDL: fds eject/insert now mappable; default f6 and f8

GTK: addded insert/eject menu options
NOTE: fds files are still broken in SDL (error loading auxillary fds file?)
This commit is contained in:
punkrockguy318 2010-02-24 07:52:37 +00:00
parent eae3042e42
commit 0547ec7af7
3 changed files with 17 additions and 7 deletions

View File

@ -303,9 +303,9 @@ InitConfig()
#endif #endif
config->addOption(prefix + "RenderBG", SDLK_F4); config->addOption(prefix + "RenderBG", SDLK_F4);
config->addOption(prefix + "SaveState", SDLK_F5); config->addOption(prefix + "SaveState", SDLK_F5);
config->addOption(prefix + "FrameAdvanceLagSkip", SDLK_F6); config->addOption(prefix + "FrameAdvanceLagSkip", SDLK_LEFTBRACKET);
config->addOption(prefix + "LoadState", SDLK_F7); config->addOption(prefix + "LoadState", SDLK_F7);
config->addOption(prefix + "LagCounterDisplay", SDLK_F8); config->addOption(prefix + "LagCounterDisplay", SDLK_RIGHTBRACKET);
config->addOption(prefix + "MovieToggleFrameDisplay", SDLK_F9); config->addOption(prefix + "MovieToggleFrameDisplay", SDLK_F9);
config->addOption(prefix + "SubtitleDisplay", SDLK_F10); config->addOption(prefix + "SubtitleDisplay", SDLK_F10);
config->addOption(prefix + "Reset", SDLK_F11); config->addOption(prefix + "Reset", SDLK_F11);
@ -321,6 +321,8 @@ InitConfig()
config->addOption(prefix + "MuteCapture", SDLK_DELETE); config->addOption(prefix + "MuteCapture", SDLK_DELETE);
#endif #endif
config->addOption(prefix + "Quit", SDLK_ESCAPE); config->addOption(prefix + "Quit", SDLK_ESCAPE);
config->addOption(prefix + "FDSSelect", SDLK_F6);
config->addOption(prefix + "FDSEject", SDLK_F8);
//config->addOption(prefix + "Power", 0); //config->addOption(prefix + "Power", 0);

View File

@ -11,6 +11,7 @@
#include "../../version.h" #include "../../version.h"
#include "../../movie.h" #include "../../movie.h"
#include "../../palette.h" #include "../../palette.h"
#include "../../fds.h"
#include "../common/configSys.h" #include "../common/configSys.h"
@ -896,6 +897,9 @@ static GtkItemFactoryEntry menu_items[] = {
{ "/Emulator/_Reset", NULL, emuReset, 0, "<Item>"}, { "/Emulator/_Reset", NULL, emuReset, 0, "<Item>"},
{ "/Emulator/_Pause", NULL, emuPause, 0, "<Item>"}, { "/Emulator/_Pause", NULL, emuPause, 0, "<Item>"},
{ "/Emulator/R_esume", NULL, emuResume, 0, "<Item>"}, { "/Emulator/R_esume", NULL, emuResume, 0, "<Item>"},
{ "/Emulator/_FDS", NULL, NULL, 0, "<Branch>"},
{ "/Emulator/_FDS/_Switch Disk", NULL, FCEU_FDSSelect, 0, "<Item>"},
{ "/Emulator/_FDS/_Eject Disk", NULL, FCEU_FDSInsert, 0, "<Item>"},
{ "/Options/_Gamepad Config", NULL , openGamepadConfig, 0, "<StockItem>", GTK_STOCK_PREFERENCES }, { "/Options/_Gamepad Config", NULL , openGamepadConfig, 0, "<StockItem>", GTK_STOCK_PREFERENCES },
{ "/Options/_Sound Config", NULL , openSoundConfig, 0, "<Item>" }, { "/Options/_Sound Config", NULL , openSoundConfig, 0, "<Item>" },
{ "/Options/_Vound Config", NULL , openVideoConfig, 0, "<Item>" }, { "/Options/_Vound Config", NULL , openVideoConfig, 0, "<Item>" },

View File

@ -186,6 +186,8 @@ int movieToggleReadWriteKey;
#ifdef CREATE_AVI #ifdef CREATE_AVI
int MuteCaptureKey; int MuteCaptureKey;
#endif #endif
int fdsSelectDiskKey;
int fdsEjectKey;
// 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
@ -228,6 +230,8 @@ void setHotKeys()
#ifdef CREATE_AVI #ifdef CREATE_AVI
g_config->getOption("SDL.Hotkeys.MuteCapture", &MuteCaptureKey); g_config->getOption("SDL.Hotkeys.MuteCapture", &MuteCaptureKey);
#endif #endif
g_config->getOption("SDL.Hotkeys.FDSSelect", &fdsSelectDiskKey);
g_config->getOption("SDL.Hotkeys.FDSEject", &fdsEjectKey);
/* /*
config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH); config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH);
config->addOption(prefix + "Power", 0); config->addOption(prefix + "Power", 0);
@ -471,15 +475,15 @@ KeyboardCommands()
} }
// Famicom disk-system games // Famicom disk-system games
if(gametype==GIT_FDS) //if(gametype==GIT_FDS)
{ //{
if(keyonly(F6)) { if(_keyonly(fdsSelectDiskKey)) {
FCEUI_FDSSelect(); FCEUI_FDSSelect();
} }
if(keyonly(F8)) { if(_keyonly(fdsEjectKey)) {
FCEUI_FDSInsert(); FCEUI_FDSInsert();
} }
} //}
if(_keyonly(screenshotKey)) { if(_keyonly(screenshotKey)) {
FCEUI_SaveSnapshot(); FCEUI_SaveSnapshot();