updated windowed mode functionality
git-svn-id: svn://anubis/dwscr/trunk@97 5bef9df8-b654-44bb-925b-0ff18baa8f8c
This commit is contained in:
parent
f392674730
commit
2ba3ce27b4
18
dwscr.cc
18
dwscr.cc
@ -37,13 +37,6 @@ int main(int argc, char * argv[])
|
||||
start = true;
|
||||
#endif
|
||||
|
||||
/* make the SDL window appear in the top-left corner of the screen */
|
||||
putenv("SDL_VIDEO_WINDOW_POS=0,0");
|
||||
|
||||
/* do not disable power management (this will allow monitors
|
||||
* to power off at the normally configured timeout) */
|
||||
putenv("SDL_VIDEO_ALLOW_SCREENSAVER=1");
|
||||
|
||||
getDisplaySize(&width, &height);
|
||||
|
||||
/* extremely simple command-line argument handling */
|
||||
@ -67,6 +60,14 @@ int main(int argc, char * argv[])
|
||||
}
|
||||
}
|
||||
|
||||
/* make the SDL window appear in the top-left corner of the screen */
|
||||
if (!windowed)
|
||||
putenv("SDL_VIDEO_WINDOW_POS=0,0");
|
||||
|
||||
/* do not disable power management (this will allow monitors
|
||||
* to power off at the normally configured timeout) */
|
||||
putenv("SDL_VIDEO_ALLOW_SCREENSAVER=1");
|
||||
|
||||
if (!start)
|
||||
return 0;
|
||||
|
||||
@ -102,7 +103,8 @@ int main(int argc, char * argv[])
|
||||
|
||||
/* after our window is created and SDL and OpenGL are initialized,
|
||||
* start the main screensaver functionality */
|
||||
SSMain ss(width, height, getNumMonitors(), sdlSurface);
|
||||
int num_monitors = windowed ? 1 : getNumMonitors();
|
||||
SSMain ss(width, height, num_monitors, sdlSurface);
|
||||
ss.run();
|
||||
|
||||
SDL_Quit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user