diff --git a/src/drivers/win/mapinput.cpp b/src/drivers/win/mapinput.cpp index f046f405..aca833cf 100644 --- a/src/drivers/win/mapinput.cpp +++ b/src/drivers/win/mapinput.cpp @@ -69,6 +69,7 @@ static struct { EMUCMD_SCRIPT_RELOAD, SCAN_L | CMD_KEY_SHIFT, }, { EMUCMD_OPENROM, SCAN_O | CMD_KEY_CTRL, }, { EMUCMD_CLOSEROM, SCAN_W | CMD_KEY_CTRL, }, + { EMUCMD_RELOADROM, SCAN_R | CMD_KEY_CTRL | CMD_KEY_SHIFT , }, { EMUCMD_MISC_UNDOREDOSAVESTATE, SCAN_Z | CMD_KEY_CTRL, }, { EMUCMD_MISC_TOGGLEFULLSCREEN, SCAN_ENTER | CMD_KEY_ALT, }, }; diff --git a/src/input.cpp b/src/input.cpp index 0e15fabc..a579346b 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -49,7 +49,7 @@ #include "drivers/win/cdlogger.h" #include "drivers/win/tracer.h" #include "drivers/win/memview.h" - +#include "drivers/win/window.h" #endif // WIN32 //it is easier to declare these input drivers extern here than include a bunch of files @@ -641,6 +641,7 @@ static void RamSearchOpNE(void); static void FA_SkipLag(void); static void OpenRom(void); static void CloseRom(void); +static void ReloadRom(void); static void MovieSubtitleToggle(void); static void UndoRedoSavestate(void); static void FCEUI_DoExit(void); @@ -755,6 +756,7 @@ struct EMUCMDTABLE FCEUI_CommandTable[]= { EMUCMD_FRAMEADV_SKIPLAG, EMUCMDTYPE_MISC, FA_SkipLag, 0, 0, "Frame Adv.-Skip Lag", 0}, { EMUCMD_OPENROM, EMUCMDTYPE_TOOL, OpenRom, 0, 0, "Open ROM", 0}, { EMUCMD_CLOSEROM, EMUCMDTYPE_TOOL, CloseRom, 0, 0, "Close ROM", 0}, + { EMUCMD_RELOADROM, EMUCMDTYPE_TOOL, ReloadRom, 0, 0, "Reload ROM", 0}, { EMUCMD_MISC_DISPLAY_MOVIESUBTITLES, EMUCMDTYPE_MISC, MovieSubtitleToggle,0,0,"Toggle Movie Subtitles", 0}, { EMUCMD_MISC_UNDOREDOSAVESTATE, EMUCMDTYPE_MISC, UndoRedoSavestate, 0,0,"Undo/Redo Savestate", 0}, { EMUCMD_MISC_TOGGLEFULLSCREEN, EMUCMDTYPE_MISC, ToggleFullscreen, 0, 0, "Toggle Fullscreen", 0}, @@ -1040,6 +1042,17 @@ static void CloseRom(void) #endif } +static void ReloadRom(void) +{ +#ifdef WIN32 + char*& fname = recent_files[0]; + if(fname) + { + ALoad(fname); + } +#endif +} + static void MovieSubtitleToggle(void) { movieSubtitles ^= 1; diff --git a/src/input.h b/src/input.h index 20f5dc04..824145e6 100644 --- a/src/input.h +++ b/src/input.h @@ -215,6 +215,7 @@ enum EMUCMD //Currently only windows (but sdl could easily add onto these) EMUCMD_OPENROM, EMUCMD_CLOSEROM, + EMUCMD_RELOADROM, //----------------------------- EMUCMD_MISC_DISPLAY_MOVIESUBTITLES, EMUCMD_MISC_UNDOREDOSAVESTATE,