   SDL window positioning
  when you create a window in sdl, is there any way to set the position at wich it will be created?   
  Not in any SDL version so far. However I think in SDL 1.3 this will finally be fixed. Best thing you can do for now is using native functions for your platform, for example use this to center the window:#include <SDL_syswm.h>voidCenterWindow(int w, int h){   int x,y;   SDL_SysWMinfo info;   SDL_VERSION(&info.version);   if(SDL_GetWMInfo(&info) > 0)   {# if defined(WIN32) x = GetSystemMetrics(SM_CXSCREEN) / 2 - w / 2; y = GetSystemMetrics(SM_CYSCREEN) / 2 - h / 2; MoveWindow(info.window, x, y, w, h, TRUE);#else   /* other platforms */#endif   }};Quote:Original post by basementNot in any SDL version so far. However I think in SDL 1.3 this will finally be fixed. Best thing you can do for now is using native functions for your platform, for example use this to center the window:#include <SDL_syswm.h>voidCenterWindow(int w, int h){   int x,y;   SDL_SysWMinfo info;   SDL_VERSION(&info.version);   if(SDL_GetWMInfo(&info) > 0)   {# if defined(WIN32) x = GetSystemMetrics(SM_CXSCREEN) / 2 - w / 2; y = GetSystemMetrics(SM_CYSCREEN) / 2 - h / 2; MoveWindow(info.window, x, y, w, h, TRUE);#else   /* other platforms */#endif   }}nice, i wasn't aware of SDL_GetWMInfo. thanks.   ;  See near the bottom of this:Quote:Note: If you want to control the position on the screen when creating a windowed surface, you may do so by setting the environment variables "SDL_VIDEO_CENTERED=center" or "SDL_VIDEO_WINDOW_POS=x,y". You can set them via SDL_putenv.More info on SDL's enviornmental variables can be found here and here.   