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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user