leffuy/andsdl-test — Issue #3: Resolution for Screens
Author: leffuy
Created: 2012-01-28 19:24:51+00:00
State: open

Need to find a way to change the screen resolution for devices with non-standard sizes/resolutions.

In main.c there are defines:

#define WIDTH 640
#define HEIGHT 480

Which are used in this code snippet:

SDL_Surface* initScreen(int width,int height)
{
if (!window) {
window = SDL_CreateWindow("Gesture Test",
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
WIDTH, HEIGHT, SDL_WINDOW_RESIZABLE);
}
if (!window) {
return NULL;
}
return SDL_GetWindowSurface(window);
}

See if the actual screen resolution presented in the app is controlled with the `SDL_CreateWindow()` function.