From 7be9a3c9c443903cbd02848e0901e48b3339ecce Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 16 Sep 2016 03:04:05 +0200 Subject: [PATCH] Disabled more stuff in case "No joystick" is selected. --- src/pc.c | 2 +- src/win-config.c | 2 +- src/win-joystick.cc | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pc.c b/src/pc.c index 6fc97f127..1a94ddb67 100644 --- a/src/pc.c +++ b/src/pc.c @@ -463,7 +463,7 @@ void runpc() keyboard_process(); // checkkeys(); pollmouse(); - joystick_poll(); + if (joystick_type != 7) joystick_poll(); endblit(); framecountx++; diff --git a/src/win-config.c b/src/win-config.c index 4e7410cc9..8b765550a 100644 --- a/src/win-config.c +++ b/src/win-config.c @@ -425,7 +425,7 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR speedchanged(); joystick_type = temp_joystick_type; - gameport_update_joystick_type(); + if (joystick_type != 7) gameport_update_joystick_type(); case IDCANCEL: EndDialog(hdlg, 0); diff --git a/src/win-joystick.cc b/src/win-joystick.cc index 1bc2dfbfc..12c94e396 100644 --- a/src/win-joystick.cc +++ b/src/win-joystick.cc @@ -91,6 +91,8 @@ void joystick_init() { int c; + if (joystick_type == 7) return; + atexit(joystick_close); joysticks_present = 0;