[SDL] How to get resolution of my SDL window?

voidstar voidstar at tin.it
Wed Dec 5 02:43:20 PST 2007


Hello,

I create my SDL window created with:

surface_screen = SDL_SetVideoMode(MAX_X, MAX_Y, BPP,
                 SDL_SWSURFACE|SDL_RESIZABLE);

After some resizes I want to get new X and Y resolution of my window.

I've tryed to do that using this Win32 function:

RECT windowRect;
GetWindowRect(hWnd, &windowRect);
//To access members
//windowRect.left
//windowRect.right
//windowRect.top
//windowRect.bottom

But this returns me the size of *all* the window, including window
border/title.

Is there an SDL/Win32 way to get X/Y resolution of my window?

Thanks in advance





More information about the SDL mailing list