[Bf-blender-cvs] [ad50210] HMD_viewport: - Fixed correct event polling for all operating systems - Fixed up openhmd cmake for windows builds
TheOnlyJoey
noreply at git.blender.org
Fri Mar 18 17:20:38 CET 2016
Commit: ad502106e4aec1992bce9eb494f3ecc3fca8fd67
Author: TheOnlyJoey
Date: Fri Mar 18 17:18:46 2016 +0100
Branches: HMD_viewport
https://developer.blender.org/rBad502106e4aec1992bce9eb494f3ecc3fca8fd67
- Fixed correct event polling for all operating systems
- Fixed up openhmd cmake for windows builds
===================================================================
M extern/openhmd/CMakeLists.txt
M intern/ghost/intern/GHOST_SystemCocoa.mm
M intern/ghost/intern/GHOST_SystemSDL.cpp
M intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
diff --git a/extern/openhmd/CMakeLists.txt b/extern/openhmd/CMakeLists.txt
index 96ab11f..763923d 100644
--- a/extern/openhmd/CMakeLists.txt
+++ b/extern/openhmd/CMakeLists.txt
@@ -1,11 +1,14 @@
project(openhmd C CXX)
-set(CMAKE_C_FLAGS "-std=c99")
+
+if (!MSVC)
+ set(CMAKE_C_FLAGS "-std=c99")
+endif(!MSVC)
include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
-if(WIN32)
- set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -DOHMD_STATIC)
-endif(WIN32)
+if(MSVC)
+ add_definitions(-DOHMD_STATIC)
+endif(MSVC)
#source files set just for Android
set(openhmd_source_files
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 87d0d74..4b188e2 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -731,7 +731,8 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
[pool drain];
/* Call base class to update os independent events */
- anyProcessed = GHOST_System::processEvents(anyProcessed);
+ if(GHOST_System::processEvents(anyProcessed))
+ anyProcessed = true;
} while (event != nil);
#if 0
} while (waitForEvent && !anyProcessed); // Needed only for timer implementation
diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp
index b6d0703..13a7063 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@ -598,7 +598,8 @@ GHOST_SystemSDL::processEvents(bool waitForEvent)
}
/* Call base class to update os independent events */
- GHOST_System::processEvents(false);
+ if(GHOST_System::processEvents(anyProcessed))
+ anyProcessed = true;
} while (waitForEvent && !anyProcessed);
return anyProcessed;
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 62c548c..077fd42 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -300,7 +300,9 @@ bool GHOST_SystemWin32::processEvents(bool waitForEvent)
}
/* Call base class to update os independent events */
- anyProcessed = GHOST_System::processEvents(anyProcessed);
+ if(GHOST_System::processEvents(anyProcessed))
+ anyProcessed = true;
+
} while (waitForEvent && !anyProcessed);
return anyProcessed;
More information about the Bf-blender-cvs
mailing list