From 4c34fe2482235a98ef24a50769a52ad079e7d3be Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Sun, 2 Aug 2015 23:39:23 +0100 Subject: [PATCH] hacky fix for stuttering --- apps/freeablo/engine/threadmanager.cpp | 7 +------ apps/freeablo/farender/renderer.cpp | 2 +- apps/freeablo/farender/renderer.h | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/freeablo/engine/threadmanager.cpp b/apps/freeablo/engine/threadmanager.cpp index 25d8399a2..d30ec9c17 100644 --- a/apps/freeablo/engine/threadmanager.cpp +++ b/apps/freeablo/engine/threadmanager.cpp @@ -35,11 +35,6 @@ namespace Engine if(!renderer->renderFrame(mRenderState)) break; - - if(mRenderState) - mRenderState->ready = true; - - mRenderState = NULL; } renderer->cleanup(); @@ -93,7 +88,7 @@ namespace Engine case renderState: { - if(mRenderState) + if (mRenderState && mRenderState != message.data.renderState) mRenderState->ready = true; mRenderState = message.data.renderState; diff --git a/apps/freeablo/farender/renderer.cpp b/apps/freeablo/farender/renderer.cpp index 74732d602..f4df86385 100644 --- a/apps/freeablo/farender/renderer.cpp +++ b/apps/freeablo/farender/renderer.cpp @@ -131,7 +131,7 @@ namespace FARender RenderState* Renderer::getFreeState() { - for(size_t i = 0; i < 3; i++) + for(size_t i = 0; i < 15; i++) { if(mStates[i].ready) { diff --git a/apps/freeablo/farender/renderer.h b/apps/freeablo/farender/renderer.h index 20350b3c4..5de255166 100644 --- a/apps/freeablo/farender/renderer.h +++ b/apps/freeablo/farender/renderer.h @@ -85,7 +85,7 @@ namespace FARender boost::atomic mDone; Render::LevelObjects mLevelObjects; - RenderState mStates[3]; + RenderState mStates[15]; Rocket::Core::Context* mRocketContext;