mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-17 04:42:01 +00:00
[idd] debounce resolution changes
This commit is contained in:
@@ -153,6 +153,15 @@ private:
|
||||
CSettings::DisplayMode m_setMode = {};
|
||||
bool m_doSetMode = false;
|
||||
|
||||
// Debounce for resolution changes. A window resize streams many WINDOWSIZE
|
||||
// requests in quick succession; rather than replug the monitor for each, we
|
||||
// (re)start a timer and only apply the last requested resolution once it has
|
||||
// remained unchanged for m_resChangeDelayMs. Guarded by m_stateLock.
|
||||
static const ULONG m_resChangeDelayMs = 1000;
|
||||
WDFTIMER m_resChangeTimer = nullptr;
|
||||
CSettings::DisplayMode m_pendingMode = {};
|
||||
bool m_resChangePending = false;
|
||||
|
||||
// Set by ReplugMonitor after a departure to rebuild the monitor from the LGMP
|
||||
// timer, off the IddCx callback thread.
|
||||
volatile LONG m_finishInitQueued = 0;
|
||||
@@ -188,6 +197,7 @@ public:
|
||||
#endif
|
||||
|
||||
void SetResolution(int width, int height);
|
||||
void ApplyResolution();
|
||||
|
||||
size_t GetAlignSize () const { return m_alignSize ; }
|
||||
size_t GetMaxFrameSize() const { return m_maxFrameSize ; }
|
||||
|
||||
Reference in New Issue
Block a user