dborth / vbagx

Visual Boy Advance GX
http://wiibrew.org/wiki/Visual_Boy_Advance_GX
299 stars 39 forks source link

Instant Rumbling #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Starting The 1.0.8 Emulator
2. It continues to rumble even while a game is loaded
3.

What is the expected output? What do you see instead?
That the controller doesn't rumble constantly

Does this issue occur on VBA-M r781
(http://vba-m.ngemu.com/vbam/vbacompiles/msvc2008/VisualBoyAdvance781.7z)?
If so, please report the issue to the VBA-M forum.

What version of the product are you using? On GameCube or Wii?

Please provide any additional information below.

Original issue reported on code.google.com by TheChees...@gmail.com on 6 Apr 2009 at 4:35

GoogleCodeExporter commented 9 years ago
I'm such an idiot. I didn't have a gamecube controller to test it on, and I 
didn't 
check my code.

Yes, it turns on rumble on the GC pad every frame of every game and every frame 
of 
every menu, regardless of what is happening.

Feel free to laugh at this code snippet (which is called every frame):

static void updateRumble() {
        bool r = false;
        if (InMenu) r = (menuRumbleCount > 0);
        else r = cartridgeRumble || (gameRumbleCount > 0) || (menuRumbleCount > 0);

#ifdef HW_RVL
        // Rumble wii remote 0
        WPAD_Rumble(0, r);
#endif
        PAD_ControlMotor(PAD_CHAN0, PAD_MOTOR_RUMBLE);
}

Note the constant PAD_MOTOR_RUMBLE instead of an IF statement based on the 
value of 
"r".

This bug only affects Gamecube controllers, so as a workaround you can unplug 
the 
Gamecube controller. I'll go and fix it now.

Original comment by Carl.Kenner@gmail.com on 7 Apr 2009 at 12:33

GoogleCodeExporter commented 9 years ago

Original comment by Carl.Kenner@gmail.com on 7 Apr 2009 at 12:35