[SDL] Window Centering?

David Olsen jolynsbass at hotmail.com
Sat Jan 1 11:59:24 PST 2005

> How is one supposed to use SDL_VIDEO_CENETERED in Win32?
> I have seen examplesof it using things like putenv and setenv.
> But i get "unresolved external" no matter which of these 2 i use.
 I don't think that there is an "internal" way yet(specifying it within your
SDL program, I mean) for Win32. Please someone correct me if I'm wrong. I do
believe it will be coming up in a near release (SDL 1.3, perhaps?). The only
way I could get it to work was to set an environment variable in the windows
system itself. If you're on XP, right-click My Computer->properties. Clicked
"Adavanced" tab. At bottom is button - "Evironment variables". click it-
then click new(either under "user" or "system", I don't think it matters,
mine's under "user"), then give variable name SDL_VIDEO_CENTERED and value
of 1. That'll do. I don't know if you need to reboot at this point, but
knowing windows like I do, you probably need to. Other than XP, or if I'm
wrong on any point, someone else help!

More information about the SDL mailing list