修复了窗口恢复焦点时,定时器和动画加快运行的BUG

This commit is contained in:
Nomango 2017-12-03 23:27:47 +08:00
parent c977bc12a3
commit 80d4880f19
4 changed files with 9 additions and 4 deletions

View File

@ -23,7 +23,7 @@
<ProjectGuid>{70931955-FE2D-4A50-93C6-6955A730B0FE}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>ConsoleDemo</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View File

@ -23,7 +23,7 @@
<ProjectGuid>{9D85A92F-BCCE-4EF0-BAD3-601C0086661C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Demo</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View File

@ -714,7 +714,12 @@ LRESULT e2d::EApp::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
pEApp->getCurrentScene()->onActivate() &&
pEApp->onActivate())
{
pEApp->m_bPaused = false;
EApp::get()->m_bPaused = false;
// 刷新当前时间
GetNow() = steady_clock::now();
// 重置动画和定时器
EActionManager::_resetAllActions();
ETimerManager::_resetAllTimers();
}
}
}

View File

@ -23,7 +23,7 @@
<ProjectGuid>{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Easy2D</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">