diff options
Diffstat (limited to 'intern/ghost/test/gears/GHOST_Test.cpp')
-rw-r--r-- | intern/ghost/test/gears/GHOST_Test.cpp | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/intern/ghost/test/gears/GHOST_Test.cpp b/intern/ghost/test/gears/GHOST_Test.cpp index 5a43543d163..3c9206b2010 100644 --- a/intern/ghost/test/gears/GHOST_Test.cpp +++ b/intern/ghost/test/gears/GHOST_Test.cpp @@ -57,7 +57,7 @@ void StereoProjection(float left, static void testTimerProc(GHOST_ITimerTask * /*task*/, uint64_t time) { - std::cout << "timer1, time=" << (int)time << "\n"; + std::cout << "timer1, time=" << int(time) << "\n"; } static void gearGL( @@ -407,17 +407,12 @@ Application::Application(GHOST_ISystem *system) stereo(false) { GHOST_GLSettings glSettings = {0}; + glSettings.context_type = GHOST_kDrawingContextTypeOpenGL; fApp = this; // Create the main window - m_mainWindow = system->createWindow("gears - main window", - 10, - 64, - 320, - 200, - GHOST_kWindowStateNormal, - GHOST_kDrawingContextTypeOpenGL, - glSettings); + m_mainWindow = system->createWindow( + "gears - main window", 10, 64, 320, 200, GHOST_kWindowStateNormal, glSettings); if (!m_mainWindow) { std::cout << "could not create main window\n"; @@ -425,14 +420,8 @@ Application::Application(GHOST_ISystem *system) } // Create a secondary window - m_secondaryWindow = system->createWindow("gears - secondary window", - 340, - 64, - 320, - 200, - GHOST_kWindowStateNormal, - GHOST_kDrawingContextTypeOpenGL, - glSettings); + m_secondaryWindow = system->createWindow( + "gears - secondary window", 340, 64, 320, 200, GHOST_kWindowStateNormal, glSettings); if (!m_secondaryWindow) { std::cout << "could not create secondary window\n"; exit(-1); @@ -559,10 +548,12 @@ bool Application::processEvent(GHOST_IEvent *event) break; case GHOST_kKeyS: // toggle mono and stereo - if (stereo) + if (stereo) { stereo = false; - else + } + else { stereo = true; + } break; case GHOST_kKeyT: @@ -680,8 +671,9 @@ int main(int /*argc*/, char ** /*argv*/) if (lresult == ERROR_SUCCESS) printf("Successfully set value for key\n"); regkey.Close(); - if (lresult == ERROR_SUCCESS) + if (lresult == ERROR_SUCCESS) { printf("Successfully closed key\n"); + } // regkey.Write("2"); } #endif // WIN32 |