[SDL] How to recenter my window...

Manuel García Cabrera manugarciac5 at yahoo.com.ar
Sun Jun 17 07:42:43 PDT 2007


I actually AM calling it before SDL_Init, I just didn't mention it
because I thought SetVideoMode was the one important... Anyway, no, it's
not working that way. It keeps using the same spot for the top left
corner, the one that centered the first window. Any time I create a new
instance of my class it appears there. I could even accept using a
platform dependent solution, BTW (Windows). I just don't have much more
time now...



Torsten Giebl escribió:
> Hello !
> 
> 
>> Right before I call SDL_SetVideoMode, I'm calling
>>
>> putenv("SDL_VIDEO_WINDOW_POS");
>> putenv("SDL_VIDEO_CENTERED=1");
> 
> 
> Try to put it at the start of your app, before calling
> SDL_Init ....
> 
> Just a guess.
> 
> 
> CU
> 
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 


More information about the SDL mailing list