Wii/GameCube: Some fixes (Thanks AndrewPH)

Fix all FPS modes waiting for vblank, instead of just the default vsync mode
Fix input issues when only GameCube controller connected (this was because the game was wrongly acting like a Wiimote with 0 buttons held was also connected, causing input to constantly toggle between the two)
This commit is contained in:
UnknownShadow200 2023-08-15 08:22:41 +10:00
parent 226ab77824
commit 13c79e1e50
2 changed files with 10 additions and 6 deletions

View File

@ -260,7 +260,8 @@ void Gfx_EndFrame(void) {
VIDEO_SetNextFramebuffer(xfbs[curFB]);
VIDEO_Flush();
VIDEO_WaitVSync();
if (gfx_vsync) VIDEO_WaitVSync();
if (gfx_minFrameMs) LimitFPS();
}

View File

@ -309,14 +309,12 @@ static void ProcessKeyboardInput(void) {
if (ke.symbol) Event_RaiseInt(&InputEvents.Press, ke.symbol);
}
}
void Window_ProcessEvents(double delta) {
Input.JoystickMovement = false;
static void ProcessWPADInput(double delta) {
WPAD_ScanPads();
u32 mods = WPAD_ButtonsDown(0) | WPAD_ButtonsHeld(0);
u32 type;
int res = WPAD_Probe(0, &type);
if (res) return;
if (launcherMode) {
ProcessWPAD_Launcher(mods);
@ -341,7 +339,12 @@ void Window_ProcessEvents(double delta) {
dragActive = false;
}
Pointer_SetPosition(0, x, y);
}
void Window_ProcessEvents(double delta) {
Input.JoystickMovement = false;
ProcessWPADInput(delta);
ProcessPADInput();
ProcessKeyboardInput();
}