From 1c5b988a83dc6710778156b67a00ad0833234599 Mon Sep 17 00:00:00 2001 From: Brad Harding Date: Tue, 6 May 2014 09:38:03 +1000 Subject: [PATCH] Fix game exiting when no gamepad connected Game would exit silently when no gamepad was connected, because gamepadfunc() wasn't initialized and still being called. Caused by change in b9091b809db97211196d542bead8763dbe737652. --- src/i_gamepad.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/i_gamepad.c b/src/i_gamepad.c index 0e374f3880..84500cd9b3 100644 --- a/src/i_gamepad.c +++ b/src/i_gamepad.c @@ -63,6 +63,8 @@ extern boolean idbehold; void I_InitGamepad(void) { + gamepadfunc = NULL; + if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) return; else