diff --git a/source/gameinput.cpp b/source/gameinput.cpp index a4484cd..16462e4 100644 --- a/source/gameinput.cpp +++ b/source/gameinput.cpp @@ -910,8 +910,6 @@ u32 HarryPotter5Input(unsigned short pad) { // WarioWare Twisted u32 TwistedInput(unsigned short pad) { - // Change this to true if you want to see the screen tilt. - TiltScreen = false; u32 J = StandardMovement(pad) | DecodeGamecube(pad); #ifdef HW_RVL WPADData * wp = WPAD_Data(pad); @@ -959,7 +957,6 @@ u32 TwistedInput(unsigned short pad) { } u32 KirbyTntInput(unsigned short pad) { - TiltScreen = false; u32 J = StandardMovement(pad) | DecodeGamecube(pad); #ifdef HW_RVL WPADData * wp = WPAD_Data(pad); diff --git a/source/input.cpp b/source/input.cpp index 60adfcc..9a439dd 100644 --- a/source/input.cpp +++ b/source/input.cpp @@ -685,9 +685,6 @@ u32 PAD_ButtonsUpFake(unsigned short pad) static u32 DecodeJoy(unsigned short pad) { - TiltScreen = false; - CursorVisible = false; - #ifdef HW_RVL CursorX = userInput[pad].wpad->ir.x; CursorY = userInput[pad].wpad->ir.y; diff --git a/source/vbagx.cpp b/source/vbagx.cpp index f9b460a..e15b83d 100644 --- a/source/vbagx.cpp +++ b/source/vbagx.cpp @@ -435,7 +435,7 @@ int main(int argc, char *argv[]) // stop checking if devices were removed/inserted // since we're starting emulation again HaltDeviceThread(); - + ResetTiltAndCursor(); ResetVideo_Emu(); // GB colorizing - set palette diff --git a/source/vbasupport.cpp b/source/vbasupport.cpp index f46fe73..223cba1 100644 --- a/source/vbasupport.cpp +++ b/source/vbasupport.cpp @@ -829,6 +829,12 @@ static void gbApplyPerImagePreferences() } } +void ResetTiltAndCursor() { + TiltScreen = false; + TiltSideways = false; + CursorVisible = false; +} + /**************************************************************************** * ApplyPerImagePreferences * Apply game specific settings, originally from vba-over.ini diff --git a/source/vbasupport.h b/source/vbasupport.h index 5ca45f1..54b8a89 100644 --- a/source/vbasupport.h +++ b/source/vbasupport.h @@ -24,6 +24,7 @@ bool LoadVBAROM(); void InitialisePalette(); bool IsGameboyGame(); bool IsGBAGame(); +void ResetTiltAndCursor(); bool LoadBatteryOrState(char * filepath, int action, bool silent); bool LoadBatteryOrStateAuto(int action, bool silent); bool SaveBatteryOrState(char * filepath, int action, bool silent);