Skip to content
Permalink
Browse files

Fix slow cursor animation with high framerates

  • Loading branch information...
dscharrer committed Mar 8, 2015
1 parent 7f87481 commit 8a52b15f2fc93530654a672955d9f3833221c911
Showing with 5 additions and 5 deletions.
  1. +4 −4 src/gui/MenuWidgets.cpp
  2. +1 −1 src/gui/MenuWidgets.h
@@ -2822,7 +2822,7 @@ MenuCursor::MenuCursor()
bMouseOver=false;

m_currentFrame=0;
lFrameDiff=0;
lFrameDiff = 0.f;
}

MenuCursor::~MenuCursor()
@@ -2981,9 +2981,9 @@ void MenuCursor::DrawCursor() {
DrawOneCursor(GInput->getMousePosAbs());
GRenderer->SetRenderState(Renderer::DepthTest, true);

lFrameDiff += checked_range_cast<long>(ARXDiffTimeMenu);
lFrameDiff += ARXDiffTimeMenu;

if(lFrameDiff > 70) {
if(lFrameDiff > 70.f) {
if(bMouseOver) {
if(m_currentFrame < 4) {
m_currentFrame++;
@@ -3004,7 +3004,7 @@ void MenuCursor::DrawCursor() {
}
}

lFrameDiff=0;
lFrameDiff = 0.f;
}

GRenderer->SetRenderState(Renderer::AlphaBlending, false);
@@ -573,7 +573,7 @@ class MenuCursor {
float m_storedTime;

// Cursor
long lFrameDiff;
float lFrameDiff;
CURSORSTATE eNumTex;
int m_currentFrame;
bool bMouseOver;

0 comments on commit 8a52b15

Please sign in to comment.
You can’t perform that action at this time.