Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximize SDL window

How should I tell SDL to maximize the application window?

I'm creating the window with these flags: SDL_OPENGL | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE.

like image 782
Matěj Zábský Avatar asked Nov 22 '08 21:11

Matěj Zábský


1 Answers

All answers seem outdated, nowadays just specify SDL_WINDOW_MAXIMIZED as flag for SDL_CreateWindow.

window = SDL_CreateWindow(
    "Foobar",
    SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720,
    SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_MAXIMIZED
);
like image 153
kungfooman Avatar answered Oct 03 '22 10:10

kungfooman