Mercurial > sdl-ios-xcode
diff test/testjoystick.c @ 2765:f55c87ae336b
Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 04 Oct 2008 06:46:59 +0000 |
parents | 6280c111ee80 |
children |
line wrap: on
line diff
--- a/test/testjoystick.c Wed Sep 17 08:24:51 2008 +0000 +++ b/test/testjoystick.c Sat Oct 04 06:46:59 2008 +0000 @@ -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 @@ } 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;