diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index 1ab72c581..5e84cb4da 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -451,6 +451,12 @@ void HK_DecreasePressure(int, bool justPressed) { osd->addLine("Stylus Pressure to %d%%",CommonSettings.StylusPressure); } +void HK_Rotate0(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 0);} +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);} + + //====================================================================================== //=====================================DEFINITIONS====================================== @@ -808,6 +814,31 @@ void InitCustomKeys (SCustomKeys *keys) keys->ResetLagCounter.page = HOTKEY_PAGE_MOVIE; keys->ResetLagCounter.key = NULL; + //Other Page ------------------------------------------------------- + keys->Rotate0.handleKeyDown = HK_Rotate0; + keys->Rotate0.code = "Rotate0"; + keys->Rotate0.name = STRW(ID_LABEL_HK57); + keys->Rotate0.page = HOTKEY_PAGE_OTHER; + keys->Rotate0.key = NULL; + + keys->Rotate90.handleKeyDown = HK_Rotate90; + keys->Rotate90.code = "Rotate90"; + keys->Rotate90.name = STRW(ID_LABEL_HK58); + keys->Rotate90.page = HOTKEY_PAGE_OTHER; + keys->Rotate90.key = NULL; + + keys->Rotate180.handleKeyDown = HK_Rotate180; + keys->Rotate180.code = "Rotate180"; + keys->Rotate180.name = STRW(ID_LABEL_HK59); + keys->Rotate180.page = HOTKEY_PAGE_OTHER; + keys->Rotate180.key = NULL; + + keys->Rotate270.handleKeyDown = HK_Rotate270; + keys->Rotate270.code = "Rotate270"; + keys->Rotate270.name = STRW(ID_LABEL_HK60); + keys->Rotate270.page = HOTKEY_PAGE_OTHER; + keys->Rotate270.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 f05f3659f..50a9af236 100644 --- a/desmume/src/windows/hotkey.h +++ b/desmume/src/windows/hotkey.h @@ -30,6 +30,7 @@ enum HotkeyPage { HOTKEY_PAGE_STATE, HOTKEY_PAGE_STATE_SLOTS, HOTKEY_PAGE_TURBO, + HOTKEY_PAGE_OTHER, NUM_HOTKEY_PAGE, }; @@ -39,6 +40,7 @@ static LPCTSTR hotkeyPageTitle[] = { _T("Savestates"), _T("Savestate Slots"), _T("Turbo"), + _T("Other"), _T("NUM_HOTKEY_PAGE"), }; @@ -65,6 +67,8 @@ struct SCustomKeys SCustomKey Slot[10]; SCustomKey QuickSave, QuickLoad, NextSaveSlot, PreviousSaveSlot; + SCustomKey Rotate0, Rotate90, Rotate180, Rotate270; + SCustomKey OpenROM, ReloadROM, Reset, Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, FrameLimitToggle, Microphone, IncreasePressure, DecreasePressure; SCustomKey PlayMovie, RecordMovie, StopMovie, ToggleReadOnly; diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index ddfb00021..cce747d88 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -435,8 +435,6 @@ bool romloaded = false; void SetScreenGap(int gap); -void SetRotate(HWND hwnd, int rot, bool user=true); - bool ForceRatio = true; bool SeparationBorderDrag = true; int ScreenGapColor = 0xFFFFFF; diff --git a/desmume/src/windows/main.h b/desmume/src/windows/main.h index 781816b48..29b0d2de6 100644 --- a/desmume/src/windows/main.h +++ b/desmume/src/windows/main.h @@ -41,6 +41,7 @@ void WavRecordTo(int wavmode); void WavEnd(); void UpdateToolWindows(); bool DemandLua(); +void SetRotate(HWND hwnd, int rot, bool user = true); extern bool frameCounterDisplay; extern bool FpsDisplay; diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index f4e461bc2..4dc184b14 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -800,6 +800,10 @@ #define ID_LABEL_HK54 4519 #define ID_LABEL_HK55 4520 #define ID_LABEL_HK56 4521 +#define ID_LABEL_HK57 4522 +#define ID_LABEL_HK58 4523 +#define ID_LABEL_HK59 4524 +#define ID_LABEL_HK60 4525 #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 c7b601cd0..9181b8562 100644 Binary files a/desmume/src/windows/resources.rc and b/desmume/src/windows/resources.rc differ