Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowWin32.cpp
| Show First 20 Lines • Show All 1,066 Lines • ▼ Show 20 Lines | if (m_wintab.open && m_wintab.info && m_wintab.queueSizeGet && m_wintab.queueSizeSet && | ||||
| } | } | ||||
| // The Wintab spec says we must open the context disabled if we are using cursor masks. | // The Wintab spec says we must open the context disabled if we are using cursor masks. | ||||
| m_wintab.context = m_wintab.open(m_hWnd, &lc, FALSE); | m_wintab.context = m_wintab.open(m_hWnd, &lc, FALSE); | ||||
| // Wintab provides no way to determine the maximum queue size aside from checking if attempts | // Wintab provides no way to determine the maximum queue size aside from checking if attempts | ||||
| // to change the queue size are successful. | // to change the queue size are successful. | ||||
| const int maxQueue = 500; | const int maxQueue = 500; | ||||
| int initialQueueSize = m_wintab.queueSizeGet(m_wintab.context); | int queueSize = m_wintab.queueSizeGet(m_wintab.context); | ||||
| int queueSize = initialQueueSize; | |||||
| while (queueSize < maxQueue) { | while (queueSize < maxQueue) { | ||||
| int testSize = min(queueSize + initialQueueSize, maxQueue); | int testSize = min(queueSize + 16, maxQueue); | ||||
| if (m_wintab.queueSizeSet(m_wintab.context, testSize)) { | if (m_wintab.queueSizeSet(m_wintab.context, testSize)) { | ||||
| queueSize = testSize; | queueSize = testSize; | ||||
| } | } | ||||
| else { | else { | ||||
| /* From Windows Wintab Documentation for WTQueueSizeSet: | /* From Windows Wintab Documentation for WTQueueSizeSet: | ||||
| * "If the return value is zero, the context has no queue because the function deletes the | * "If the return value is zero, the context has no queue because the function deletes the | ||||
| * original queue before attempting to create a new one. The application must continue | * original queue before attempting to create a new one. The application must continue | ||||
| * calling the function with a smaller queue size until the function returns a non - zero | * calling the function with a smaller queue size until the function returns a non - zero | ||||
| ▲ Show 20 Lines • Show All 418 Lines • Show Last 20 Lines | |||||