From 30c095fde8b923e62ecbf670958027e893cc1d45 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 16 Oct 2017 01:22:24 +0200 Subject: [PATCH] fixed the joystick bug (also 10.1c) --- control.cpp | 8 ++++---- graph.cpp | 2 +- shmup.cpp | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/control.cpp b/control.cpp index e873562f..5658292d 100644 --- a/control.cpp +++ b/control.cpp @@ -140,12 +140,12 @@ void initJoysticks() { if(numsticks > 8) numsticks = 8; for(int i=0; i= 0) queuecircleat(cwt.c->mov[(joydir.d+cwt.spin) % cwt.c->type], .78 - .02 * sin(ticks/199.0), darkena(0x00FF00, 0, 0xFF)); diff --git a/shmup.cpp b/shmup.cpp index 9de58b03..789f8eff 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -139,7 +139,7 @@ string listkeys(int id) { for(int i=0; i<512; i++) if(vid.scfg.keyaction[i] == id) lk = lk + " " + SDL_GetKeyName(SDLKey(i)); -#if CAP_JOY +#if CAP_SDLJOY for(int i=0; i 2) dialog::addItem(XLAT("configure player 3") + dsc(2), '3'); -#if CAP_JOY +#if CAP_SDLJOY else if(vid.scfg.players == 1 && !shmupcfg && !shmupcfg && !multi::alwaysuse) dialog::addItem(XLAT("old style joystick configuration"), 'b'); #endif @@ -280,7 +280,7 @@ void showShmupConfig() { dialog::addItem(XLAT("configure panning and general keys"), 'p'); else dialog::addBreak(100); -#if CAP_JOY +#if CAP_SDLJOY if(numsticks > 0) { if(shmupcfg || multi::alwaysuse || vid.scfg.players > 1) dialog::addItem(XLAT("configure joystick axes"), 'j'); @@ -351,11 +351,11 @@ void handleConfig(int sym, int uni) { else if(uni == '5') vid.scfg.subconfig = 6; else if(uni == '6') vid.scfg.subconfig = 7; else if(uni == '7') vid.scfg.subconfig = 8; -#if CAP_JOY +#if CAP_SDLJOY else if(uni == 'j') vid.scfg.subconfig = SCJOY; #endif else if(uni == 'a') multi::alwaysuse = !multi::alwaysuse; -#if CAP_JOY +#if CAP_SDLJOY else if(uni == 'b') pushScreen(showJoyConfig); #endif else if(uni == 'r') @@ -634,7 +634,7 @@ void handleInput(int delta) { for(int i=0; i