Commit 997531f2 authored by Oliver Bock's avatar Oliver Bock
Browse files

Added "--demo" command line parameter

* Enables initial fullscreen mode (without screensaver behavior)
* Note: both available parameters are optional and mutually exclusive
parent 4bd6a6d3
......@@ -164,7 +164,10 @@ public:
void toggleFullscreen();
/**
* \brief Set the screensaver mode indicator
* \brief Set the screensaver mode indicator.
*
* When enabled, all user input will cause the application to quit
* (common screensaver behavior)
*
* \param enabled The new value for the screensaver mode indicator
*/
......
......@@ -112,15 +112,18 @@ int main(int argc, char **argv)
graphics->initialize(window.windowWidth(), window.windowHeight(), fontResource);
graphics->refreshBOINCInformation();
// check optional command line parameter
// check optional command line parameters
if(argc == 2) {
string param(argv[1]);
if(param == "--fullscreen") {
// set non-interactive mode (must do this first on Apple)
window.setScreensaverMode(true);
}
if(param == "--fullscreen" || param == "--demo") {
// switch to fullscreen (on windoze: after init!)
window.setScreensaverMode(true); // Must do this first on Apple
window.toggleFullscreen();
#ifdef __APPLE__
SetMacSSLevel();
SetMacSSLevel();
#endif
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment