+void MainWin::HandleGamepads(void)
+{
+ Gamepad::Update();
+
+ for(int i=BUTTON_FIRST; i<=BUTTON_LAST; i++)
+ {
+ if (vjs.p1KeyBindings[i] & (JOY_BUTTON | JOY_HAT))
+ joypad_0_buttons[i] = (Gamepad::GetState(0, vjs.p1KeyBindings[i]) ? 0x01 : 0x00);
+
+ if (vjs.p2KeyBindings[i] & (JOY_BUTTON | JOY_HAT))
+ joypad_1_buttons[i] = (Gamepad::GetState(1, vjs.p2KeyBindings[i]) ? 0x01 : 0x00);
+ }
+}
+
+