mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-16 19:55:19 +00:00
Repaint ScEd at 2 fps when non-minimised but behind other windows
This was SVN commit r2339.
This commit is contained in:
@@ -187,13 +187,18 @@ int CScEdApp::Run()
|
||||
// do idle time processing
|
||||
CMainFrame* mainfrm=(CMainFrame*) AfxGetMainWnd();
|
||||
if (mainfrm) {
|
||||
if (!mainfrm->IsIconic()) {
|
||||
CScEdView* view=(CScEdView*) mainfrm->GetActiveView();
|
||||
if (view) {
|
||||
view->IdleTimeProcess();
|
||||
}
|
||||
}
|
||||
Sleep(50);
|
||||
|
||||
// longer delay when visible but not active
|
||||
if (!mainfrm->IsTopParentActive())
|
||||
Sleep(450);
|
||||
|
||||
if (!mainfrm->IsIconic()) {
|
||||
CScEdView* view=(CScEdView*) mainfrm->GetActiveView();
|
||||
if (view) {
|
||||
view->IdleTimeProcess();
|
||||
}
|
||||
}
|
||||
Sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user