From 9d5d400f7ad6404f08af803d4e6b5a401f67f700 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Wed, 20 Jun 2012 04:05:50 -0300 Subject: [PATCH] Fix cmake issue --- src/framework/CMakeLists.txt | 5 ++++- src/framework/application.cpp | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt index 72c9d3bb..852e8c2d 100644 --- a/src/framework/CMakeLists.txt +++ b/src/framework/CMakeLists.txt @@ -10,7 +10,10 @@ OPTION(CRASH_HANDLER "Generate crash reports" ON) OPTION(LUAJIT "Use lua jit" OFF) SET(OPENGLES "OFF" CACHE "Use OpenGL ES 1.0 or 2.0 (for mobiles devices)" STRING) SET(BUILD_REVISION "custom" CACHE "Git revision string (intended for releases)" STRING) -SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE "Build type (Release, MinSizeRel, RelWithDebInfo or Debug)" STRING) + +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "RelWithDebInfo") +ENDIF() IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(ARCH_FLAGS "-m64 -march=x86-64 -mtune=generic") diff --git a/src/framework/application.cpp b/src/framework/application.cpp index 52ff51d9..3f94adbd 100644 --- a/src/framework/application.cpp +++ b/src/framework/application.cpp @@ -181,8 +181,9 @@ void Application::run() // first clock update g_clock.update(); - // show the application window - g_window.show(); + // show the application only after we draw some frames + g_eventDispatcher.scheduleEvent([] { g_window.show(); }, 10); + while(!m_stopping) { // poll all events before rendering