diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-17 18:02:51 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-17 18:04:59 -0300 |
commit | 03d27c7f32248f860a1b1cc51776d8156632ec02 (patch) | |
tree | a6f2761076c261aee58db167b70b23d4775a883f /libre/openmw/bullet-251.patch | |
parent | 0e8b2d0e0155e4a0b4ea020e76a4336b577c9123 (diff) | |
download | abslibre-03d27c7f32248f860a1b1cc51776d8156632ec02.tar.gz abslibre-03d27c7f32248f860a1b1cc51776d8156632ec02.tar.bz2 abslibre-03d27c7f32248f860a1b1cc51776d8156632ec02.zip |
openmw-0.40.0-4.parabola1: fix build against bullet with profiler disabled
Diffstat (limited to 'libre/openmw/bullet-251.patch')
-rw-r--r-- | libre/openmw/bullet-251.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/libre/openmw/bullet-251.patch b/libre/openmw/bullet-251.patch new file mode 100644 index 000000000..27f66dd82 --- /dev/null +++ b/libre/openmw/bullet-251.patch @@ -0,0 +1,76 @@ +From 5ccbabc27d7f1ec02447680e4bed28d12333fb77 Mon Sep 17 00:00:00 2001 +From: scrawl <scrawl@baseoftrash.de> +Date: Fri, 14 Oct 2016 20:59:55 +0200 +Subject: [PATCH] Fix build against bullet with profiler disabled (Fixes #3592) + +--- + apps/openmw/mwgui/debugwindow.cpp | 7 +++++++ + apps/openmw/mwphysics/physicssystem.cpp | 3 +++ + 2 files changed, 10 insertions(+) + +diff --git a/apps/openmw/mwgui/debugwindow.cpp b/apps/openmw/mwgui/debugwindow.cpp +index 37ea347..a29910f 100644 +--- a/apps/openmw/mwgui/debugwindow.cpp ++++ b/apps/openmw/mwgui/debugwindow.cpp +@@ -7,6 +7,8 @@ + + #include <LinearMath/btQuickprof.h> + ++#ifndef BT_NO_PROFILE ++ + namespace + { + void bulletDumpRecursive(CProfileIterator* pit, int spacing, std::stringstream& os) +@@ -71,6 +73,7 @@ namespace + } + } + ++#endif // BT_NO_PROFILE + + namespace MWGui + { +@@ -92,10 +95,13 @@ namespace MWGui + + MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize(); + mMainWidget->setSize(viewSize); ++ ++ + } + + void DebugWindow::onFrame(float dt) + { ++#ifndef BT_NO_PROFILE + if (!isVisible()) + return; + +@@ -115,6 +121,7 @@ namespace MWGui + size_t previousPos = mBulletProfilerEdit->getVScrollPosition(); + mBulletProfilerEdit->setCaption(stream.str()); + mBulletProfilerEdit->setVScrollPosition(std::min(previousPos, mBulletProfilerEdit->getVScrollRange()-1)); ++#endif + } + + } +diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp +index 954d195..e442fbd 100644 +--- a/apps/openmw/mwphysics/physicssystem.cpp ++++ b/apps/openmw/mwphysics/physicssystem.cpp +@@ -14,6 +14,7 @@ + #include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h> + #include <BulletCollision/CollisionDispatch/btCollisionWorld.h> + #include <BulletCollision/BroadphaseCollision/btDbvtBroadphase.h> ++ + #include <LinearMath/btQuickprof.h> + + #include <components/nifbullet/bulletnifloader.hpp> +@@ -1363,8 +1364,10 @@ namespace MWPhysics + for (std::set<Object*>::iterator it = mAnimatedObjects.begin(); it != mAnimatedObjects.end(); ++it) + (*it)->animateCollisionShapes(mCollisionWorld); + ++#ifndef BT_NO_PROFILE + CProfileManager::Reset(); + CProfileManager::Increment_Frame_Counter(); ++#endif + } + + void PhysicsSystem::debugDraw() |