Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWin32.cpp')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 5904a72b186..af02663985d 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -1401,16 +1401,16 @@ void GHOST_WindowWin32::updatePendingWintabEvents()
if (!(m_wintab.packetsGet && m_wintab.context)) {
return;
}
- GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)GHOST_System::getSystem();
auto &pendingEvents = m_wintab.pendingEvents;
/* Clear outdated events from queue. */
- GHOST_TUns64 currTime = system->getMilliSeconds();
- GHOST_TUns64 timeout = 300;
+ DWORD currTime = ::GetTickCount();
+ DWORD millisTimeout = 500;
while (!pendingEvents.empty()) {
- GHOST_TUns64 pktTime = system->millisSinceStart(pendingEvents.front().pkTime);
- if (currTime - pktTime > timeout) {
+ DWORD pkTime = pendingEvents.front().pkTime;
+
+ if (currTime > pkTime + millisTimeout) {
pendingEvents.pop();
}
else {
@@ -1426,8 +1426,9 @@ void GHOST_WindowWin32::updatePendingWintabEvents()
/* Don't queue outdated packets, such events can include packets that occurred before the current
* window lost and regained focus. */
for (; i < numPackets; i++) {
- GHOST_TUns64 pktTime = system->millisSinceStart(m_wintab.pkts[i].pkTime);
- if (currTime - pktTime < timeout) {
+ DWORD pkTime = m_wintab.pkts[i].pkTime;
+
+ if (currTime < pkTime + millisTimeout) {
break;
}
}