Apps can now request portrait mode if desired

This commit is contained in:
Henrik Rydgard 2012-04-10 15:44:58 +02:00
parent 1f669609ae
commit 888b973bf3
5 changed files with 33 additions and 10 deletions

View file

@ -112,12 +112,18 @@ int main(int argc, char *argv[]) {
g_xres = 1280;
g_yres = 800;
*/
g_xres = 800;
g_yres = 480;
std::string app_name;
std::string app_name_nice;
NativeGetAppInfo(&app_name, &app_name_nice);
bool landscape;
NativeGetAppInfo(&app_name, &app_name_nice, &landscape);
if (landscape) {
g_xres = 800;
g_yres = 480;
} else {
g_xres = 480;
g_yres = 800;
}
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError());