Mercurial > sdl-ios-xcode
changeset 2433:450a9bf50c37 gsoc2008_iphone
Added line to set proper display resolution on iPhone OS
author | Holmes Futrell <hfutrell@umail.ucsb.edu> |
---|---|
date | Fri, 15 Aug 2008 00:59:14 +0000 |
parents | daf3baf72a45 |
children | 12d3b55ebbfc |
files | test/testjoystick.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/testjoystick.c Fri Aug 15 00:57:58 2008 +0000 +++ b/test/testjoystick.c Fri Aug 15 00:59:14 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;