diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index de415003f..cdbfee024 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -480,6 +480,16 @@ void HK_Rotate90(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 90);} void HK_Rotate180(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 180);} void HK_Rotate270(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 270);} + +void HK_CursorToggle(int, bool) +{ + static int cursorVisible = ShowCursor(TRUE); + if(cursorVisible >= 0) + while( (cursorVisible = ShowCursor(FALSE)) >= 0); + else + while( (cursorVisible = ShowCursor(TRUE)) <= 0); +} + //====================================================================================== //=====================================DEFINITIONS====================================== //====================================================================================== @@ -875,6 +885,12 @@ void InitCustomKeys (SCustomKeys *keys) keys->Rotate270.page = HOTKEY_PAGE_OTHER; keys->Rotate270.key = NULL; + keys->CursorToggle.handleKeyDown = HK_CursorToggle; + keys->CursorToggle.code = "Toggle Cursor"; + keys->CursorToggle.name = STRW(ID_LABEL_HK62); + keys->CursorToggle.page = HOTKEY_PAGE_OTHER; + keys->CursorToggle.key = NULL; + //StateSlots Page -------------------------------------------------- keys->NextSaveSlot.handleKeyDown = HK_NextSaveSlot; keys->NextSaveSlot.code = "NextSaveSlot"; diff --git a/desmume/src/windows/hotkey.h b/desmume/src/windows/hotkey.h index 398c288a7..3bfd4c147 100644 --- a/desmume/src/windows/hotkey.h +++ b/desmume/src/windows/hotkey.h @@ -72,6 +72,8 @@ struct SCustomKeys SCustomKey Rotate0, Rotate90, Rotate180, Rotate270; + SCustomKey CursorToggle; + SCustomKey OpenROM, ReloadROM, Reset, Pause; #ifdef HAVE_JIT diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index 0f22df284..9c60f299a 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -808,6 +808,7 @@ #define ID_LABEL_HK59 4524 #define ID_LABEL_HK60 4525 #define ID_LABEL_HK61 4526 +#define ID_LABEL_HK62 4527 #define IDD_MICROPHONE 5000 #define IDM_MICROPHONESETTINGS 5001 #define IDC_MICSAMPLEBROWSE 5003 diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index e36975e58..40a7d16b7 100644 Binary files a/desmume/src/windows/resources.rc and b/desmume/src/windows/resources.rc differ