SDL_SetVideoMode creates a window of the wrong size (osx) |
PeterP_op
|
Hello,
On startup in my program I call: SDL_Surface *myScreen = SDL_SetVideoMode(480, 800, 16, SDL_SWSURFACE | SDL_RESIZABLE); This works well on my development machine where I have a large screen and resolution. But when this code runs on a MacBook with a native screen resolution of 1280x800, it automatically squeeze the window size to be much smaller (depending on the dock size etc). However it doesn't tell me about this, so I end up misinterpreting where mouse clicks happens. Is there a way to check what size the window actually ended up being, or even better: make if fail or report max size possible? (myScreen->w=480, myScreen->h=800, which obviously doesn't match the actual window size in this case). I haven't managed to setup SDL so I can step through SDL_SetVideoMode to check what actually happens, but I browsed through the bug database and it seems like it could be related to http://bugzilla.libsdl.org/show_bug.cgi?id=422, but I'm not sure. Any help would be greatly appreciated. Thanks, Peter |
|||||||||||
|
SDL_SetVideoMode creates a window of the wrong size (osx) |
Patrice Mandin
Guest
|
Le Fri, 16 Apr 2010 04:05:39 -0700
"PeterP_op" a écrit:
[snip]
if myScreen->w and myScreen->h that are returned do not match what you see on screen, maybe it's because you received a resize event you did not take into account? -- Patrice Mandin WWW: http://pmandin.atari.org/ Programmeur Linux, Atari Spécialité: Développement, jeux _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
Re: SDL_SetVideoMode creates a window of the wrong size (osx |