1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 01:17:39 +00:00

fixed the joystick bug (also 10.1c)

This commit is contained in:
Zeno Rogue
2017-10-16 01:22:24 +02:00
parent e06a3cc68a
commit 30c095fde8
3 changed files with 12 additions and 12 deletions

View File

@@ -140,12 +140,12 @@ void initJoysticks() {
if(numsticks > 8) numsticks = 8;
for(int i=0; i<numsticks; i++) {
sticks[i] = SDL_JoystickOpen(i);
/* printf("axes = %d, balls = %d, buttons = %d, hats = %d\n",
printf("axes = %d, balls = %d, buttons = %d, hats = %d\n",
SDL_JoystickNumAxes(sticks[i]),
SDL_JoystickNumBalls(sticks[i]),
SDL_JoystickNumButtons(sticks[i]),
SDL_JoystickNumHats(sticks[i])
); */
);
}
}
@@ -496,7 +496,7 @@ void mainloopiter() {
panjoyx = panjoyy = 0;
closeJoysticks();
initJoysticks();
}*/
} */
if(ev.type == SDL_ACTIVEEVENT) {
if(ev.active.state & SDL_APPINPUTFOCUS) {
@@ -522,7 +522,7 @@ void mainloopiter() {
drawscreen();
}
#if CAP_JOY
#if CAP_SDLJOY
if(ev.type == SDL_JOYAXISMOTION && normal && DEFAULTCONTROL) {
if(ev.jaxis.which == 0) {
if(ev.jaxis.axis == 0)