reset tilt and cursor every time when returning to the game.

This commit is contained in:
Daryl Borth 2019-01-07 20:06:08 -07:00
parent 5f8e21baea
commit 91ab0f2f5a
5 changed files with 8 additions and 7 deletions

View File

@ -910,8 +910,6 @@ u32 HarryPotter5Input(unsigned short pad) {
// WarioWare Twisted // WarioWare Twisted
u32 TwistedInput(unsigned short pad) { 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); u32 J = StandardMovement(pad) | DecodeGamecube(pad);
#ifdef HW_RVL #ifdef HW_RVL
WPADData * wp = WPAD_Data(pad); WPADData * wp = WPAD_Data(pad);
@ -959,7 +957,6 @@ u32 TwistedInput(unsigned short pad) {
} }
u32 KirbyTntInput(unsigned short pad) { u32 KirbyTntInput(unsigned short pad) {
TiltScreen = false;
u32 J = StandardMovement(pad) | DecodeGamecube(pad); u32 J = StandardMovement(pad) | DecodeGamecube(pad);
#ifdef HW_RVL #ifdef HW_RVL
WPADData * wp = WPAD_Data(pad); WPADData * wp = WPAD_Data(pad);

View File

@ -685,9 +685,6 @@ u32 PAD_ButtonsUpFake(unsigned short pad)
static u32 DecodeJoy(unsigned short pad) static u32 DecodeJoy(unsigned short pad)
{ {
TiltScreen = false;
CursorVisible = false;
#ifdef HW_RVL #ifdef HW_RVL
CursorX = userInput[pad].wpad->ir.x; CursorX = userInput[pad].wpad->ir.x;
CursorY = userInput[pad].wpad->ir.y; CursorY = userInput[pad].wpad->ir.y;

View File

@ -435,7 +435,7 @@ int main(int argc, char *argv[])
// stop checking if devices were removed/inserted // stop checking if devices were removed/inserted
// since we're starting emulation again // since we're starting emulation again
HaltDeviceThread(); HaltDeviceThread();
ResetTiltAndCursor();
ResetVideo_Emu(); ResetVideo_Emu();
// GB colorizing - set palette // GB colorizing - set palette

View File

@ -829,6 +829,12 @@ static void gbApplyPerImagePreferences()
} }
} }
void ResetTiltAndCursor() {
TiltScreen = false;
TiltSideways = false;
CursorVisible = false;
}
/**************************************************************************** /****************************************************************************
* ApplyPerImagePreferences * ApplyPerImagePreferences
* Apply game specific settings, originally from vba-over.ini * Apply game specific settings, originally from vba-over.ini

View File

@ -24,6 +24,7 @@ bool LoadVBAROM();
void InitialisePalette(); void InitialisePalette();
bool IsGameboyGame(); bool IsGameboyGame();
bool IsGBAGame(); bool IsGBAGame();
void ResetTiltAndCursor();
bool LoadBatteryOrState(char * filepath, int action, bool silent); bool LoadBatteryOrState(char * filepath, int action, bool silent);
bool LoadBatteryOrStateAuto(int action, bool silent); bool LoadBatteryOrStateAuto(int action, bool silent);
bool SaveBatteryOrState(char * filepath, int action, bool silent); bool SaveBatteryOrState(char * filepath, int action, bool silent);