4

I have an application that does not run in full-screen mode. After SDL_init I execute SDL_SetVideoMode(0, 0, SDL_OPENGL | SDL_HWSURFACE | SDL_ASYNCBLIT). From what I read, this should allocate a window of maximum size. The unfortunate thing now is that it allocates a window of 1600x900: which is the physical size of the monitor but not the free space on the monitor (some of it is used by the menu-row and by the window-border). Any ideas how I can find how much space is available?

Martin G
  • 17,357
  • 9
  • 82
  • 98
Folkert van Heusden
  • 433
  • 4
  • 17
  • 38

1 Answers1

-2

What I have in my program that runs fullscreen (hiding menus, docks, panels etc) is:

if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_TIMER ) < 0 ) {
    throw SDL_GetError();
}
const SDL_VideoInfo* vidinfo = SDL_GetVideoInfo();
int max_w = vidinfo->current_w;
int max_h = vidinfo->current_h;
.
.
.
SDL_Surface *screen = SDL_SetVideoMode(max_w,max_h,0,SDL_FULLSCREEN);

Be sure to call SDL_GetVideoInfo() before SDL_SetVideoMode().