From bd5f91edcf53df635a6694701d040c57f8134c54 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 31 Jul 2006 07:40:11 +0000 Subject: [PATCH] added newline to __dummy_mapper.cpp considered the windows default hotkeys --- src/boards/__dummy_mapper.cpp | 2 +- src/driver.h | 9 ++++- src/drivers/win/input.cpp | 74 ++++++++++++++++++----------------- src/drivers/win/keyscan.h | 1 + 4 files changed, 47 insertions(+), 39 deletions(-) diff --git a/src/boards/__dummy_mapper.cpp b/src/boards/__dummy_mapper.cpp index ac95ba9c..0ceb54c9 100644 --- a/src/boards/__dummy_mapper.cpp +++ b/src/boards/__dummy_mapper.cpp @@ -93,4 +93,4 @@ void MapperNNN_Init(CartInfo *info) AddExState(WRAM, WRAMSIZE, 0, "WRAM"); */ AddExState(&StateRegs, ~0, 0, 0); -} \ No newline at end of file +} diff --git a/src/driver.h b/src/driver.h index e59556d6..225365b5 100644 --- a/src/driver.h +++ b/src/driver.h @@ -287,10 +287,11 @@ int FCEUI_AviIsRecording(void); void FCEUD_AviRecordTo(void); void FCEUD_AviStop(void); -/* Command input mapping */ +///A callback that the emu core uses to poll the state of a given emulator command key typedef int TestCommandState(int cmd); +///Signals the emu core to poll for emulator commands and take actions void FCEUI_HandleEmuCommands(TestCommandState* testfn); -void FCEUD_CmdOpen(void); + /* Emulation speed */ enum EMUSPEED_SET @@ -309,6 +310,9 @@ int FCEUD_ShowStatusIcon(void); void FCEUD_ToggleStatusIcon(void); void FCEUD_HideMenuToggle(void); +///signals the driver to perform a file open GUI operation +void FCEUD_CmdOpen(void); + //new merge-era driver routines here: //signals that the cpu core hit a breakpoint @@ -325,4 +329,5 @@ void FCEUD_UpdateNTView(int scanline, int drawall); //the driver might should update its PPUView (only used if debugging support is compiled in) void FCEUD_UpdatePPUView(int scanline, int drawall); + #endif /* __DRIVER_H_ */ diff --git a/src/drivers/win/input.cpp b/src/drivers/win/input.cpp index 279819a1..300bd78c 100644 --- a/src/drivers/win/input.cpp +++ b/src/drivers/win/input.cpp @@ -1221,14 +1221,14 @@ static struct int key; } DefaultCommandMapping[]= { - { EMUCMD_RESET, SCAN_R | CMD_KEY_CTRL, }, - { EMUCMD_PAUSE, SCAN_PAUSE, }, - { EMUCMD_FRAME_ADVANCE, SCAN_BACKSLASH, }, - { EMUCMD_SCREENSHOT, SCAN_F12 }, + { EMUCMD_RESET, SCAN_R | CMD_KEY_CTRL }, + { EMUCMD_PAUSE, SCAN_F2, }, + { EMUCMD_FRAME_ADVANCE, SCAN_TAB, }, + { EMUCMD_SCREENSHOT, SCAN_F9 }, { EMUCMD_HIDE_MENU_TOGGLE, SCAN_ESCAPE }, - { EMUCMD_SPEED_SLOWER, SCAN_MINUS, }, - { EMUCMD_SPEED_FASTER, SCAN_EQUAL, }, - { EMUCMD_SPEED_TURBO, SCAN_TAB, }, + //{ EMUCMD_SPEED_SLOWER, SCAN_MINUS, }, // think about these + //{ EMUCMD_SPEED_FASTER, SCAN_EQUAL, }, // think about these + { EMUCMD_SPEED_TURBO, SCAN_GRAVE, }, //tilde { EMUCMD_SAVE_SLOT_0, SCAN_0, }, { EMUCMD_SAVE_SLOT_1, SCAN_1, }, { EMUCMD_SAVE_SLOT_2, SCAN_2, }, @@ -1239,28 +1239,36 @@ static struct { EMUCMD_SAVE_SLOT_7, SCAN_7, }, { EMUCMD_SAVE_SLOT_8, SCAN_8, }, { EMUCMD_SAVE_SLOT_9, SCAN_9, }, - { EMUCMD_SAVE_STATE, SCAN_F5 | CMD_KEY_CTRL, }, - { EMUCMD_LOAD_STATE, SCAN_F7 | CMD_KEY_CTRL, }, - { EMUCMD_SAVE_STATE_SLOT_0, SCAN_F10 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_1, SCAN_F1 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_2, SCAN_F2 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_3, SCAN_F3 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_4, SCAN_F4 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_5, SCAN_F5 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_6, SCAN_F6 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_7, SCAN_F7 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_8, SCAN_F8 | CMD_KEY_SHIFT, }, - { EMUCMD_SAVE_STATE_SLOT_9, SCAN_F9 | CMD_KEY_SHIFT, }, - { EMUCMD_LOAD_STATE_SLOT_0, SCAN_F10, }, - { EMUCMD_LOAD_STATE_SLOT_1, SCAN_F1, }, - { EMUCMD_LOAD_STATE_SLOT_2, SCAN_F2, }, - { EMUCMD_LOAD_STATE_SLOT_3, SCAN_F3, }, - { EMUCMD_LOAD_STATE_SLOT_4, SCAN_F4, }, - { EMUCMD_LOAD_STATE_SLOT_5, SCAN_F5, }, - { EMUCMD_LOAD_STATE_SLOT_6, SCAN_F6, }, - { EMUCMD_LOAD_STATE_SLOT_7, SCAN_F7, }, - { EMUCMD_LOAD_STATE_SLOT_8, SCAN_F8, }, - { EMUCMD_LOAD_STATE_SLOT_9, SCAN_F9, }, + { EMUCMD_SAVE_STATE, SCAN_F5, }, + { EMUCMD_LOAD_STATE, SCAN_F7, }, + //get feedback from TAS people about these + /*{ EMUCMD_MOVIE_FRAME_DISPLAY_TOGGLE, SCAN_PERIOD, }, + { EMUCMD_FDS_EJECT_INSERT, SCAN_F8, }, + { EMUCMD_FDS_SIDE_SELECT, SCAN_F6, }, + { EMUCMD_MOVIE_INPUT_DISPLAY_TOGGLE, SCAN_COMMA, }, + { EMUCMD_MOVIE_READONLY_TOGGLE, SCAN_8 | CMD_KEY_SHIFT, },*/ + { EMUCMD_MISC_REWIND, SCAN_R, }, + //mbg 7/31/06 - these have been removed as defaults until we decide whether hotkey philosophy permits them + //{ EMUCMD_SAVE_STATE_SLOT_0, SCAN_F10 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_1, SCAN_F1 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_2, SCAN_F2 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_3, SCAN_F3 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_4, SCAN_F4 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_5, SCAN_F5 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_6, SCAN_F6 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_7, SCAN_F7 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_8, SCAN_F8 | CMD_KEY_SHIFT, }, + //{ EMUCMD_SAVE_STATE_SLOT_9, SCAN_F9 | CMD_KEY_SHIFT, }, + //{ EMUCMD_LOAD_STATE_SLOT_0, SCAN_F10, }, + //{ EMUCMD_LOAD_STATE_SLOT_1, SCAN_F1, }, + //{ EMUCMD_LOAD_STATE_SLOT_2, SCAN_F2, }, + //{ EMUCMD_LOAD_STATE_SLOT_3, SCAN_F3, }, + //{ EMUCMD_LOAD_STATE_SLOT_4, SCAN_F4, }, + //{ EMUCMD_LOAD_STATE_SLOT_5, SCAN_F5, }, + //{ EMUCMD_LOAD_STATE_SLOT_6, SCAN_F6, }, + //{ EMUCMD_LOAD_STATE_SLOT_7, SCAN_F7, }, + //{ EMUCMD_LOAD_STATE_SLOT_8, SCAN_F8, }, + //{ EMUCMD_LOAD_STATE_SLOT_9, SCAN_F9, }, /* { EMUCMD_MOVIE_SLOT_0, SCAN_0 | CMD_KEY_ALT, }, { EMUCMD_MOVIE_SLOT_1, SCAN_1 | CMD_KEY_ALT, }, { EMUCMD_MOVIE_SLOT_2, SCAN_2 | CMD_KEY_ALT, }, @@ -1273,12 +1281,6 @@ static struct { EMUCMD_MOVIE_SLOT_9, SCAN_9 | CMD_KEY_ALT, }, { EMUCMD_MOVIE_RECORD, SCAN_F5 | CMD_KEY_ALT, }, { EMUCMD_MOVIE_REPLAY, SCAN_F7 | CMD_KEY_ALT, },*/ - { EMUCMD_MOVIE_FRAME_DISPLAY_TOGGLE, SCAN_PERIOD, }, - { EMUCMD_FDS_EJECT_INSERT, SCAN_F8 | CMD_KEY_CTRL, }, - { EMUCMD_FDS_SIDE_SELECT, SCAN_F6 | CMD_KEY_CTRL, }, - { EMUCMD_MOVIE_INPUT_DISPLAY_TOGGLE, SCAN_COMMA, }, - { EMUCMD_MOVIE_READONLY_TOGGLE, SCAN_8 | CMD_KEY_SHIFT, }, - { EMUCMD_MISC_REWIND, SCAN_R, }, }; #define NUM_DEFAULT_MAPPINGS (sizeof(DefaultCommandMapping)/sizeof(DefaultCommandMapping[0])) @@ -1365,7 +1367,7 @@ static const char* ScanNames[256]= { /* 0x00-0x0f */ 0, "Escape", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "Minus", "Equals", "Backspace", "Tab", /* 0x10-0x1f */ "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]", "Enter", "Left Ctrl", "A", "S", - /* 0x20-0x2f */ "D", "F", "G", "H", "J", "K", "L", "Semicolon", "Apostrophe", "Grave", "Left Shift", "Backslash", "Z", "X", "C", "V", + /* 0x20-0x2f */ "D", "F", "G", "H", "J", "K", "L", "Semicolon", "Apostrophe", "Tilde", "Left Shift", "Backslash", "Z", "X", "C", "V", /* 0x30-0x3f */ "B", "N", "M", "Comma", "Period", "Slash", "Right Shift", "Numpad *", "Left Alt", "Space", "Caps Lock", "F1", "F2", "F3", "F4", "F5", /* 0x40-0x4f */ "F6", "F7", "F8", "F9", "F10", "NumLock", "ScrollLock", "Numpad 7", "Numpad 8", "Numpad 9", "Numpad Minus", "Numpad 4", "Numpad 5", "Numpad 6", "Numpad Plus", "Numpad 1", /* 0x50-0x5f */ "Numpad 2", "Numpad 3", "Numpad 0", "Numpad Period", 0, 0, "Backslash", "F11", "F12", 0, 0, 0, 0, 0, 0, 0, diff --git a/src/drivers/win/keyscan.h b/src/drivers/win/keyscan.h index dade4c19..26a7d620 100644 --- a/src/drivers/win/keyscan.h +++ b/src/drivers/win/keyscan.h @@ -89,6 +89,7 @@ #define SCAN_BL_PAGEDOWN (0x51|0x80) #define SCAN_BL_CURSORRIGHT (0x4D|0x80) +#define SCAN_PRINTSCREEN 0xB7 #define SCAN_SCROLLLOCK 0x46 /* Keys often found in the key pad area. */ #define SCAN_NUMLOCK 0x45