Fix Open-Apple (joy button 0) stuck after reboot

This commit is contained in:
Aaron Culliney 2014-10-25 12:51:09 -07:00
parent a2a55d53ed
commit 0eeb93820c
3 changed files with 12 additions and 4 deletions

View File

@ -326,6 +326,12 @@ static void c_calibrate_pc_joystick()
#endif // INTERFACE_CLASSIC
#endif // LINUX_JOYSTICK
void c_initialize_joystick(void) {
joy_button0 = 0x0;
joy_button1 = 0x0;
joy_button2 = 0x0;
}
#if defined(KEYPAD_JOYSTICK) && defined(INTERFACE_CLASSIC)
static void c_calibrate_keypad_joystick()
{

View File

@ -33,9 +33,10 @@ extern uint8_t joy_auto_recenter;
extern short joy_step;
#endif
void c_open_joystick();
void c_close_joystick();
void c_calibrate_joystick();
void c_joystick_reset();
void c_initialize_joystick(void);
void c_open_joystick(void);
void c_close_joystick(void);
void c_calibrate_joystick(void);
void c_joystick_reset(void);
#endif // whole file

View File

@ -574,6 +574,7 @@ void c_initialize_vm() {
c_initialize_sound_hooks(); /* sound system */
c_init_6(); /* drive ][, slot 6 */
c_initialize_iie_switches(); /* set the //e softswitches */
c_initialize_joystick(); /* reset joystick buttons */
}
/* -------------------------------------------------------------------------