Mercurial > sdl-ios-xcode
annotate test/testkeys.c @ 5133:ec13e48ee0d9
Fixed bug #1112 (retina display support)
Vittorio Giovara 2011-02-01 02:21:50 PST
with the attached patch, the opengles context will always use the maximum
screensize available; this is particularly useful for supporting retina display
on latest iphone.
please note: Apple documentation warns that using the "upscaled" gl context
actually uses more memory and bandwitdh, so it might be worth to let the user
decide whether to disable it or not, either with a flag or a sdl function...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 01 Feb 2011 08:54:34 -0800 |
parents | 25d4feb7c127 |
children | 572a73d71b5f |
rev | line source |
---|---|
0 | 1 |
2306 | 2 /* Print out all the scancodes we have, just to verify them */ |
0 | 3 |
4 #include <stdio.h> | |
5 #include <ctype.h> | |
1154
d93862a3d821
Fixed compiler warnings in Watcom C.
Ryan C. Gordon <icculus@icculus.org>
parents:
0
diff
changeset
|
6 #include <stdlib.h> |
d93862a3d821
Fixed compiler warnings in Watcom C.
Ryan C. Gordon <icculus@icculus.org>
parents:
0
diff
changeset
|
7 #include <string.h> |
0 | 8 |
9 #include "SDL.h" | |
10 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
11 int |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
12 main(int argc, char *argv[]) |
0 | 13 { |
5083 | 14 SDL_ScanCode scancode; |
0 | 15 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
16 if (SDL_Init(SDL_INIT_VIDEO) < 0) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
17 fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
18 exit(1); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
19 } |
2306 | 20 for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) { |
21 printf("Scancode #%d, \"%s\"\n", scancode, | |
22 SDL_GetScancodeName(scancode)); | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
23 } |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
24 SDL_Quit(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1154
diff
changeset
|
25 return (0); |
0 | 26 } |