소스 검색

Fixed build

Sam Lantinga 3 년 전
부모
커밋
19ecb64e0d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      test/testjoystick.c

+ 1 - 1
test/testjoystick.c

@@ -245,9 +245,9 @@ loop(void *arg)
         SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0xFF, SDL_ALPHA_OPAQUE);
         for (i = 0; i < SDL_JoystickNumHats(joystick); ++i) {
             /* Derive the new position */
+            const Uint8 hat_pos = SDL_JoystickGetHat(joystick, i);
             x = SCREEN_WIDTH/2;
             y = SCREEN_HEIGHT/2;
-            const Uint8 hat_pos = SDL_JoystickGetHat(joystick, i);
 
             if (hat_pos & SDL_HAT_UP) {
                 y = 0;