Revert Automatic Tablet API dynamic fallback.

Removes fallback to Windows Ink when Wintab reports no devices present.
Returns to old behavior of using only Wintab if Wintab.dll exists.
This commit is contained in:
Nicholas Rishel
2021-02-23 10:04:19 -08:00
parent 37afeb7eaa
commit 6844b768f3
3 changed files with 1 additions and 22 deletions

View File

@@ -1459,10 +1459,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
////////////////////////////////////////////////////////////////////////
// Wintab events, processed
////////////////////////////////////////////////////////////////////////
case WT_INFOCHANGE:
window->processWintabInfoChangeEvent(lParam);
eventHandled = true;
break;
case WT_PACKET:
window->processWin32TabletEvent(wParam, lParam);
break;

View File

@@ -355,8 +355,6 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
if (m_wintab.enable && m_wintab.tablet) {
m_wintab.enable(m_wintab.tablet, TRUE);
}
m_wintab.info(WTI_INTERFACE, IFC_NDEVICES, &m_wintab.numDevices);
}
}
CoCreateInstance(
@@ -1122,7 +1120,7 @@ bool GHOST_WindowWin32::useTabletAPI(GHOST_TTabletAPI api) const
return true;
}
else if (m_system->getTabletAPI() == GHOST_kTabletAutomatic) {
if (m_wintab.numDevices)
if (m_wintab.tablet)
return api == GHOST_kTabletWintab;
else
return api == GHOST_kTabletNative;
@@ -1164,14 +1162,6 @@ void GHOST_WindowWin32::processWin32TabletInitEvent()
m_tabletData.Active = GHOST_kTabletModeNone;
}
void GHOST_WindowWin32::processWintabInfoChangeEvent(LPARAM lParam)
{
/* Update number of connected Wintab digitizers */
if (LOWORD(lParam) == WTI_INTERFACE && HIWORD(lParam) == IFC_NDEVICES) {
m_wintab.info(WTI_INTERFACE, IFC_NDEVICES, &m_wintab.numDevices);
}
}
void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam)
{
if (!useTabletAPI(GHOST_kTabletWintab)) {

View File

@@ -446,12 +446,6 @@ class GHOST_WindowWin32 : public GHOST_Window {
WPARAM wParam,
LPARAM lParam);
/**
* Handle Wintab info changes such as change in number of connected tablets.
* \param lParam: LPARAM of the event.
*/
void processWintabInfoChangeEvent(LPARAM lParam);
void processWin32TabletActivateEvent(WORD state);
void processWin32TabletInitEvent();
void processWin32TabletEvent(WPARAM wParam, LPARAM lParam);
@@ -572,7 +566,6 @@ class GHOST_WindowWin32 : public GHOST_Window {
HCTX tablet;
LONG maxPressure;
LONG maxAzimuth, maxAltitude;
UINT numDevices;
} m_wintab;
GHOST_TWindowState m_normal_state;