aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2013-08-01 18:10:33 +0200
committerMemphiz <memphis@machzwo.de>2013-08-01 18:10:33 +0200
commit84a8264e2e66d292dd38ce75e8c0f4a418e412f1 (patch)
treee317febef568c21a92bb98f75759836256239f77
parente92b24b97e2c582471ffab91818e3f2299a91bbe (diff)
[guidialog] - fix autoclose by moveing the autoclose logic into UpdateVisibility for ensuring that getframetime returns sane values - thx to jm for the solution
-rw-r--r--xbmc/guilib/GUIDialog.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/xbmc/guilib/GUIDialog.cpp b/xbmc/guilib/GUIDialog.cpp
index 79434c8abe..83d3b3bfb4 100644
--- a/xbmc/guilib/GUIDialog.cpp
+++ b/xbmc/guilib/GUIDialog.cpp
@@ -142,6 +142,23 @@ void CGUIDialog::UpdateVisibility()
else
Close();
}
+
+ if (m_autoClosing)
+ { // check if our timer is running
+ if (!m_showStartTime)
+ {
+ if (HasProcessed()) // start timer
+ m_showStartTime = CTimeUtils::GetFrameTime();
+ }
+ else
+ {
+ if (m_showStartTime + m_showDuration < CTimeUtils::GetFrameTime() && !m_closing)
+ {
+ m_bAutoClosed = true;
+ Close();
+ }
+ }
+ }
}
void CGUIDialog::DoModal_Internal(int iWindowID /*= WINDOW_INVALID */, const CStdString &param /* = "" */)
@@ -230,22 +247,6 @@ void CGUIDialog::Show()
void CGUIDialog::FrameMove()
{
- if (m_autoClosing)
- { // check if our timer is running
- if (!m_showStartTime)
- {
- if (HasProcessed()) // start timer
- m_showStartTime = CTimeUtils::GetFrameTime();
- }
- else
- {
- if (m_showStartTime + m_showDuration < CTimeUtils::GetFrameTime() && !m_closing)
- {
- m_bAutoClosed = true;
- Close();
- }
- }
- }
CGUIWindow::FrameMove();
}