Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added line to set proper display resolution on iPhone OS
Browse files Browse the repository at this point in the history
  • Loading branch information
Holmes Futrell committed Aug 15, 2008
1 parent 14bc159 commit c697743
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/testjoystick.c
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c697743

Please sign in to comment.