From c6977432c66cb3f3ddc33938374e3244f5f97a22 Mon Sep 17 00:00:00 2001 From: Holmes Futrell Date: Fri, 15 Aug 2008 00:59:14 +0000 Subject: [PATCH] Added line to set proper display resolution on iPhone OS --- test/testjoystick.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/testjoystick.c b/test/testjoystick.c index 827bcef4e..16ece8eb7 100644 --- a/test/testjoystick.c +++ b/test/testjoystick.c @@ -7,8 +7,13 @@ #include "SDL.h" +#ifdef __IPHONEOS__ +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 480 +#else #define SCREEN_WIDTH 640 #define SCREEN_HEIGHT 480 +#endif void WatchJoystick(SDL_Joystick * joystick) @@ -129,6 +134,7 @@ WatchJoystick(SDL_Joystick * joystick) } else if (y > (SCREEN_HEIGHT - 16)) { y = SCREEN_HEIGHT - 16; } + axis_area[i][draw].x = (Sint16) x; axis_area[i][draw].y = (Sint16) y; axis_area[i][draw].w = 16;