diff options
Diffstat (limited to 'engines/testbed/graphics.cpp')
-rw-r--r-- | engines/testbed/graphics.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp new file mode 100644 index 0000000000..b8fcc40564 --- /dev/null +++ b/engines/testbed/graphics.cpp @@ -0,0 +1,40 @@ +#include "testbed/graphics.h" + +namespace Testbed { + +bool testFullScreenMode() { + + printf("Testing fullscreen mode\n"); + bool isFeaturePresent; + bool isFeatureEnabled; + + isFeaturePresent = g_system->hasFeature(OSystem::kFeatureFullscreenMode); + isFeatureEnabled = g_system->getFeatureState(OSystem::kFeatureFullscreenMode); + + printf("Testing Feature Presence.. \n"); + if (isFeaturePresent) { + //Toggle + printf("Supported\n"); + + g_system->beginGFXTransaction(); + g_system->setFeatureState(OSystem::kFeatureFullscreenMode, !isFeatureEnabled); + g_system->endGFXTransaction(); + + g_system->delayMillis(1000); + + g_system->beginGFXTransaction(); + g_system->setFeatureState(OSystem::kFeatureFullscreenMode, isFeatureEnabled); + g_system->endGFXTransaction(); + } + +} + +GFXTestSuite::GFXTestSuite() { + addTest("FullScreenMode", &testFullScreenMode); +} + +int execute() { + //TODO: Implement the method +} + +} |