diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/vmpi/idle_dialog.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/vmpi/idle_dialog.cpp')
| -rw-r--r-- | utils/vmpi/idle_dialog.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/utils/vmpi/idle_dialog.cpp b/utils/vmpi/idle_dialog.cpp new file mode 100644 index 0000000..5518fff --- /dev/null +++ b/utils/vmpi/idle_dialog.cpp @@ -0,0 +1,46 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#include "stdafx.h" +#include "idle_dialog.h" + + +#define WM_STARTIDLE (WM_USER + 565) + + +BEGIN_MESSAGE_MAP(CIdleDialog, CDialog) + //{{AFX_MSG_MAP(CVMPIBrowserDlg) + ON_MESSAGE(WM_STARTIDLE, OnStartIdle) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + + +CIdleDialog::CIdleDialog( int id, CWnd *pParent ) + : CDialog( id, pParent ) +{ +} + + +void CIdleDialog::StartIdleProcessing( DWORD msInterval ) +{ + m_cWinIdle.StartIdle( GetSafeHwnd(), WM_STARTIDLE, 0, 0, msInterval ); + m_cWinIdle.NextIdle(); +} + + +LONG CIdleDialog::OnStartIdle( UINT, LONG ) +{ + MSG msg; + + if ( !PeekMessage( &msg, GetSafeHwnd(), 0,0, PM_NOREMOVE ) ) + OnIdle(); + + m_cWinIdle.NextIdle(); + return 0; +} + + |