From 25aac0088d2775eb7101173453dd2714c4be73cf Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 3 Jan 2004 09:31:44 +0000 Subject: [PATCH] Center SDL loading windows in X11. --- stepmania/src/arch/LoadingWindow/LoadingWindow_SDL.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow_SDL.cpp b/stepmania/src/arch/LoadingWindow/LoadingWindow_SDL.cpp index 7a505f788e..9264d3d891 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow_SDL.cpp +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow_SDL.cpp @@ -9,6 +9,13 @@ LoadingWindow_SDL::LoadingWindow_SDL() { + /* There's no consistent way to hint SDL that we want a centered + * window. X11 way: */ +#if defined(unix) + static char center[]="SDL_VIDEO_CENTERED=1"; + putenv( center ); +#endif + /* Initialize the SDL library */ if( SDL_InitSubSystem(SDL_INIT_VIDEO) < 0 ) RageException::Throw( "Couldn't initialize SDL: %s", SDL_GetError() );