[Bf-blender-cvs] [eb554051e7a] master: Revert Automatic Tablet API dynamic fallback.
Nicholas Rishel
noreply at git.blender.org
Tue Feb 23 22:31:31 CET 2021
Commit: eb554051e7a3a9b9bfd611c07a4d01ef26048d44
Author: Nicholas Rishel
Date: Tue Feb 23 10:04:19 2021 -0800
Branches: master
https://developer.blender.org/rBeb554051e7a3a9b9bfd611c07a4d01ef26048d44
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.
===================================================================
M intern/ghost/intern/GHOST_SystemWin32.cpp
M intern/ghost/intern/GHOST_WindowWin32.cpp
M intern/ghost/intern/GHOST_WindowWin32.h
===================================================================
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 45944d4d889..430e8216ae3 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1453,10 +1453,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;
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index a166fa490e2..ad5643fcd89 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -299,8 +299,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(
@@ -1033,7 +1031,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;
@@ -1075,14 +1073,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)) {
diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h
index 0965be509e4..d86a5c12040 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.h
+++ b/intern/ghost/intern/GHOST_WindowWin32.h
@@ -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);
@@ -576,7 +570,6 @@ class GHOST_WindowWin32 : public GHOST_Window {
HCTX tablet;
LONG maxPressure;
LONG maxAzimuth, maxAltitude;
- UINT numDevices;
} m_wintab;
GHOST_TWindowState m_normal_state;
More information about the Bf-blender-cvs
mailing list