Added Open Rom and Close Rom hotkeys (functions are #IFDEF WIN32). Win32 - removed accel keys for Open/Close ROM. Res.rc cleanup.
This commit is contained in:
parent
67774c1322
commit
8ac6fa1256
|
@ -25,7 +25,8 @@
|
||||||
|
|
||||||
extern int maxconbskip;
|
extern int maxconbskip;
|
||||||
extern int ffbskip;
|
extern int ffbskip;
|
||||||
|
extern void LoadNewGamey(HWND hParent, const char *initialdir);
|
||||||
|
extern void CloseGame();
|
||||||
static int fullscreen = 0;
|
static int fullscreen = 0;
|
||||||
|
|
||||||
// Flag that indicates whether Game Genie is enabled or not.
|
// Flag that indicates whether Game Genie is enabled or not.
|
||||||
|
|
|
@ -79,8 +79,10 @@ static struct
|
||||||
//{ EMUCMD_MOVIE_SLOT_9, SCAN_9 | CMD_KEY_ALT, },
|
//{ EMUCMD_MOVIE_SLOT_9, SCAN_9 | CMD_KEY_ALT, },
|
||||||
//{ EMUCMD_MOVIE_RECORD, SCAN_F5 | CMD_KEY_ALT, },
|
//{ EMUCMD_MOVIE_RECORD, SCAN_F5 | CMD_KEY_ALT, },
|
||||||
//{ EMUCMD_MOVIE_REPLAY, SCAN_F7 | CMD_KEY_ALT, },
|
//{ EMUCMD_MOVIE_REPLAY, SCAN_F7 | CMD_KEY_ALT, },
|
||||||
{ EMUCMD_MOVIE_PLAY_FROM_BEGINNING, SCAN_R | CMD_KEY_SHIFT },
|
{ EMUCMD_MOVIE_PLAY_FROM_BEGINNING, SCAN_R | CMD_KEY_SHIFT },
|
||||||
{ EMUCMD_SCRIPT_RELOAD, SCAN_L | CMD_KEY_SHIFT },
|
{ EMUCMD_SCRIPT_RELOAD, SCAN_L | CMD_KEY_SHIFT },
|
||||||
|
{ EMUCMD_OPENROM, SCAN_O | CMD_KEY_CTRL },
|
||||||
|
{ EMUCMD_CLOSEROM, SCAN_W | CMD_KEY_CTRL },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_DEFAULT_MAPPINGS (sizeof(DefaultCommandMapping)/sizeof(DefaultCommandMapping[0]))
|
#define NUM_DEFAULT_MAPPINGS (sizeof(DefaultCommandMapping)/sizeof(DefaultCommandMapping[0]))
|
||||||
|
|
|
@ -39,8 +39,8 @@ FCEUMENU MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&File"
|
POPUP "&File"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Open... Ctrl+O", MENU_OPEN_FILE
|
MENUITEM "&Open...", MENU_OPEN_FILE
|
||||||
MENUITEM "&Close Ctrl+W", MENU_CLOSE_FILE
|
MENUITEM "&Close", MENU_CLOSE_FILE
|
||||||
MENUITEM "&Recent", MENU_RECENT_FILES
|
MENUITEM "&Recent", MENU_RECENT_FILES
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Load State From...", MENU_LOAD_STATE
|
MENUITEM "Load State From...", MENU_LOAD_STATE
|
||||||
|
@ -59,7 +59,7 @@ BEGIN
|
||||||
MENUITEM "Run Lua Script...", ID_FILE_RUNLUASCRIPT
|
MENUITEM "Run Lua Script...", ID_FILE_RUNLUASCRIPT
|
||||||
MENUITEM "Stop Lua Script", ID_FILE_STOPLUASCRIPT
|
MENUITEM "Stop Lua Script", ID_FILE_STOPLUASCRIPT
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "E&xit Alt+F4", MENU_EXIT
|
MENUITEM "E&xit\tAlt+F4", MENU_EXIT
|
||||||
END
|
END
|
||||||
POPUP "&NES"
|
POPUP "&NES"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -172,31 +172,31 @@ TASEDITMENU MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&File"
|
POPUP "&File"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&New Project Ctrl+N", ID_FILE_NEWPROJECT
|
MENUITEM "&New Project\tCtrl+N", ID_FILE_NEWPROJECT
|
||||||
MENUITEM "&Open Project... Ctrl+O", ID_FILE_OPENPROJECT
|
MENUITEM "&Open Project...\tCtrl+O", ID_FILE_OPENPROJECT
|
||||||
MENUITEM "&Save Project Ctrl+S", ID_FILE_SAVEPROJECT
|
MENUITEM "&Save ProjectCtrl+S", ID_FILE_SAVEPROJECT
|
||||||
MENUITEM "Save Project As... Ctrl+Shift+S", ID_FILE_SAVEPROJECTAS
|
MENUITEM "Save Project As...\tCtrl+Shift+S", ID_FILE_SAVEPROJECTAS
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Import FM2", ID_FILE_IMPORTFM2
|
MENUITEM "Import FM2", ID_FILE_IMPORTFM2
|
||||||
MENUITEM "Export to FM2", ID_FILE_EXPORTFM2
|
MENUITEM "Export to FM2", ID_FILE_EXPORTFM2
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Close Ctrl+W", ID_TASEDIT_FILE_CLOSE
|
MENUITEM "Close\tCtrl+W", ID_TASEDIT_FILE_CLOSE
|
||||||
END
|
END
|
||||||
POPUP "Edit"
|
POPUP "Edit"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Select All", ID_EDIT_SELECTALL
|
MENUITEM "Select All", ID_EDIT_SELECTALL
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Cut Ctrl+X", ID_TASEDIT_CUT
|
MENUITEM "Cut\tCtrl+X", ID_TASEDIT_CUT
|
||||||
MENUITEM "Copy Ctrl+C", ID_TASEDIT_COPY
|
MENUITEM "Copy\tCtrl+C", ID_TASEDIT_COPY
|
||||||
MENUITEM "Paste Ctrl+V", ID_TASEDIT_PASTE
|
MENUITEM "Paste\tCtrl+V", ID_TASEDIT_PASTE
|
||||||
MENUITEM "Paste to New Ctrl+Shift+V", ID_TASEDIT_PASTETONEW
|
MENUITEM "Paste to New\tCtrl+Shift+V", ID_TASEDIT_PASTETONEW
|
||||||
MENUITEM "Delete Ctrl+Delete", ID_TASEDIT_DELETE
|
MENUITEM "Delete\tCtrl+Delete", ID_TASEDIT_DELETE
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Add Marker", ID_EDIT_ADDMARKER
|
MENUITEM "Add Marker", ID_EDIT_ADDMARKER
|
||||||
MENUITEM "Remove Marker", ID_EDIT_REMOVEMARKER
|
MENUITEM "Remove Marker", ID_EDIT_REMOVEMARKER
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Truncate Ctrl+T", ID_EDIT_TRUNCATE
|
MENUITEM "Truncate\tCtrl+T", ID_EDIT_TRUNCATE
|
||||||
MENUITEM "Branch Ctrl+B", ID_EDIT_BRANCH
|
MENUITEM "Branch\tCtrl+B", ID_EDIT_BRANCH
|
||||||
END
|
END
|
||||||
MENUITEM "View", ID_VIEW
|
MENUITEM "View", ID_VIEW
|
||||||
POPUP "Help"
|
POPUP "Help"
|
||||||
|
@ -219,11 +219,11 @@ BEGIN
|
||||||
MENUITEM "&PPU Memory", MENU_MV_FILE_DUMP_PPU
|
MENUITEM "&PPU Memory", MENU_MV_FILE_DUMP_PPU
|
||||||
END
|
END
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Close", ID_MEMWVIEW_FILE_CLOSE
|
MENUITEM "Close\tAlt+F4", ID_MEMWVIEW_FILE_CLOSE
|
||||||
END
|
END
|
||||||
POPUP "&Edit"
|
POPUP "&Edit"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Undo Ctrl+Z", MENU_MV_EDIT_UNDO
|
MENUITEM "Undo\tCtrl+Z", MENU_MV_EDIT_UNDO
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Copy", MENU_MV_EDIT_COPY
|
MENUITEM "Copy", MENU_MV_EDIT_COPY
|
||||||
MENUITEM "Paste", MENU_MV_EDIT_PASTE
|
MENUITEM "Paste", MENU_MV_EDIT_PASTE
|
||||||
|
|
|
@ -588,6 +588,16 @@ void FCEUD_HideMenuToggle(void)
|
||||||
ToggleHideMenu();
|
ToggleHideMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CloseGame()
|
||||||
|
{
|
||||||
|
if (GameInfo)
|
||||||
|
{
|
||||||
|
FCEUI_CloseGame();
|
||||||
|
KillMemView();
|
||||||
|
updateGameDependentMenus(GameInfo != 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ALoad(char *nameo, char* innerFilename)
|
void ALoad(char *nameo, char* innerFilename)
|
||||||
{
|
{
|
||||||
if(FCEUI_LoadGameVirtual(nameo, 1))
|
if(FCEUI_LoadGameVirtual(nameo, 1))
|
||||||
|
@ -1107,33 +1117,24 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
FCEUI_VSUniCoin();
|
FCEUI_VSUniCoin();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case MENU_MEMORY_WATCH:
|
case MENU_MEMORY_WATCH:
|
||||||
CreateMemWatch();
|
CreateMemWatch();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACCEL_CTRL_O:
|
|
||||||
case MENU_OPEN_FILE:
|
case MENU_OPEN_FILE:
|
||||||
// User selected the Open File menu => Show the file selection dialog
|
// User selected the Open File menu => Show the file selection dialog
|
||||||
LoadNewGamey(hWnd, 0);
|
LoadNewGamey(hWnd, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACCEL_CTRL_W:
|
|
||||||
case MENU_CLOSE_FILE:
|
case MENU_CLOSE_FILE:
|
||||||
// User selected the Close File menu => Close the game if necessary
|
// User selected the Close File menu => Close the game if necessary
|
||||||
if(GameInfo)
|
CloseGame();
|
||||||
{
|
|
||||||
FCEUI_CloseGame();
|
|
||||||
KillMemView();
|
|
||||||
updateGameDependentMenus(GameInfo != 0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_CONVERT_MOVIE:
|
case MENU_CONVERT_MOVIE:
|
||||||
ConvertFCM(hWnd);
|
ConvertFCM(hWnd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case MENU_SAVE_STATE:
|
case MENU_SAVE_STATE:
|
||||||
// Save state as menu was selected
|
// Save state as menu was selected
|
||||||
FCEUD_SaveStateAs();
|
FCEUD_SaveStateAs();
|
||||||
|
|
|
@ -592,6 +592,8 @@ static void LaunchHex(void);
|
||||||
static void LaunchTraceLogger(void);
|
static void LaunchTraceLogger(void);
|
||||||
static void LaunchCodeDataLogger(void);
|
static void LaunchCodeDataLogger(void);
|
||||||
static void FA_SkipLag(void);
|
static void FA_SkipLag(void);
|
||||||
|
static void OpenRom(void);
|
||||||
|
static void CloseRom(void);
|
||||||
|
|
||||||
struct EMUCMDTABLE FCEUI_CommandTable[]=
|
struct EMUCMDTABLE FCEUI_CommandTable[]=
|
||||||
{
|
{
|
||||||
|
@ -722,17 +724,19 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
||||||
{ EMUCMD_MISC_USE_INPUT_PRESET_1, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 1", 0 },
|
{ EMUCMD_MISC_USE_INPUT_PRESET_1, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 1", 0 },
|
||||||
{ EMUCMD_MISC_USE_INPUT_PRESET_2, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 2", 0 },
|
{ EMUCMD_MISC_USE_INPUT_PRESET_2, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 2", 0 },
|
||||||
{ EMUCMD_MISC_USE_INPUT_PRESET_3, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 3", 0 },
|
{ EMUCMD_MISC_USE_INPUT_PRESET_3, EMUCMDTYPE_MISC, CommandUsePreset, 0, 0, "Use Input Preset 3", 0 },
|
||||||
{ EMUCMD_MISC_DISPLAY_BG_TOGGLE, EMUCMDTYPE_MISC, BackgroundDisplayToggle, 0, 0, "Toggle Background Display", 0 },
|
{ EMUCMD_MISC_DISPLAY_BG_TOGGLE, EMUCMDTYPE_MISC, BackgroundDisplayToggle, 0, 0, "Toggle Background Display", 0 },
|
||||||
{ EMUCMD_MISC_DISPLAY_OBJ_TOGGLE, EMUCMDTYPE_MISC, ObjectDisplayToggle, 0, 0, "Toggle Object Display", 0 },
|
{ EMUCMD_MISC_DISPLAY_OBJ_TOGGLE, EMUCMDTYPE_MISC, ObjectDisplayToggle, 0, 0, "Toggle Object Display", 0 },
|
||||||
{ EMUCMD_MISC_DISPLAY_LAGCOUNTER_TOGGLE, EMUCMDTYPE_MISC, LagCounterToggle, 0, 0, "Lag Counter Toggle", 0 },
|
{ EMUCMD_MISC_DISPLAY_LAGCOUNTER_TOGGLE,EMUCMDTYPE_MISC, LagCounterToggle, 0, 0, "Lag Counter Toggle", 0 },
|
||||||
{ EMUCMD_MISC_LAGCOUNTER_RESET, EMUCMDTYPE_MISC, LagCounterReset, 0, 0, "Lag Counter Reset", 0},
|
{ EMUCMD_MISC_LAGCOUNTER_RESET, EMUCMDTYPE_MISC, LagCounterReset, 0, 0, "Lag Counter Reset", 0},
|
||||||
{ EMUCMD_TOOL_OPENMEMORYWATCH, EMUCMDTYPE_TOOL, LaunchMemoryWatch, 0, 0, "Open Memory Watch", 0},
|
{ EMUCMD_TOOL_OPENMEMORYWATCH, EMUCMDTYPE_TOOL, LaunchMemoryWatch,0, 0, "Open Memory Watch", 0},
|
||||||
{ EMUCMD_TOOL_OPENDEBUGGER, EMUCMDTYPE_TOOL, LaunchDebugger, 0, 0, "Open Debugger", 0},
|
{ EMUCMD_TOOL_OPENDEBUGGER, EMUCMDTYPE_TOOL, LaunchDebugger, 0, 0, "Open Debugger", 0},
|
||||||
{ EMUCMD_TOOL_OPENHEX, EMUCMDTYPE_TOOL, LaunchHex, 0, 0, "Open Hex Editor", 0},
|
{ EMUCMD_TOOL_OPENHEX, EMUCMDTYPE_TOOL, LaunchHex, 0, 0, "Open Hex Editor", 0},
|
||||||
{ EMUCMD_TOOL_OPENPPU, EMUCMDTYPE_TOOL, LaunchPPU, 0, 0, "Open PPU Viewer", 0},
|
{ EMUCMD_TOOL_OPENPPU, EMUCMDTYPE_TOOL, LaunchPPU, 0, 0, "Open PPU Viewer", 0},
|
||||||
{ EMUCMD_TOOL_OPENTRACELOGGER, EMUCMDTYPE_TOOL, LaunchTraceLogger, 0, 0, "Open Trace Logger", 0},
|
{ EMUCMD_TOOL_OPENTRACELOGGER, EMUCMDTYPE_TOOL, LaunchTraceLogger, 0, 0, "Open Trace Logger", 0},
|
||||||
{ EMUCMD_TOOL_OPENCDLOGGER, EMUCMDTYPE_TOOL, LaunchCodeDataLogger, 0, 0, "Open Code/Data Logger", 0},
|
{ EMUCMD_TOOL_OPENCDLOGGER, EMUCMDTYPE_TOOL, LaunchCodeDataLogger, 0, 0, "Open Code/Data Logger", 0},
|
||||||
{ EMUCMD_FRAMEADV_SKIPLAG, EMUCMDTYPE_MISC, FA_SkipLag, 0, 0, "Frame Adv.-Skip Lag", 0}
|
{ 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}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_EMU_CMDS (sizeof(FCEUI_CommandTable)/sizeof(FCEUI_CommandTable[0]))
|
#define NUM_EMU_CMDS (sizeof(FCEUI_CommandTable)/sizeof(FCEUI_CommandTable[0]))
|
||||||
|
@ -921,3 +925,18 @@ static void FA_SkipLag(void)
|
||||||
{
|
{
|
||||||
frameAdvanceLagSkip ^= 1;
|
frameAdvanceLagSkip ^= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void OpenRom(void)
|
||||||
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
extern HWND hAppWnd;
|
||||||
|
LoadNewGamey(hAppWnd, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CloseRom(void)
|
||||||
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
CloseGame();
|
||||||
|
#endif
|
||||||
|
}
|
|
@ -237,6 +237,8 @@ enum EMUCMD
|
||||||
EMUCMD_TOOL_OPENTRACELOGGER,
|
EMUCMD_TOOL_OPENTRACELOGGER,
|
||||||
EMUCMD_TOOL_OPENCDLOGGER,
|
EMUCMD_TOOL_OPENCDLOGGER,
|
||||||
EMUCMD_FRAMEADV_SKIPLAG,
|
EMUCMD_FRAMEADV_SKIPLAG,
|
||||||
|
EMUCMD_OPENROM,
|
||||||
|
EMUCMD_CLOSEROM,
|
||||||
|
|
||||||
EMUCMD_MAX
|
EMUCMD_MAX
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue