Commit: fe1dd8b9adc29e9dd589f1ba6a9b4e5828d002cb
Author: Nicholas Rishel
Date:   Tue Jun 15 15:49:00 2021 -0700
Branches: wintab-high-frequency
https://developer.blender.org/rBfe1dd8b9adc29e9dd589f1ba6a9b4e5828d002cb

Rename to clarify API used.

===================================================================

M       intern/ghost/GHOST_Types.h
M       intern/ghost/intern/GHOST_SystemWin32.cpp
M       intern/ghost/intern/GHOST_WindowWin32.cpp
M       source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index 3a8d0fbfecf..f18e6f03ede 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -105,7 +105,9 @@ typedef enum {
 
 typedef enum {
   GHOST_kTabletAutomatic = 0,
-  GHOST_kTabletNative,
+  /* Show as Windows Ink to users to match "Use Windows Ink" in tablet 
utilities, but we use the
+     dependent Windows Pointer API. */
+  GHOST_kTabletWinPointer,
   GHOST_kTabletWintab,
 } GHOST_TTabletAPI;
 
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp 
b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 46030e2da98..62f174db476 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1002,7 +1002,7 @@ void GHOST_SystemWin32::processPointerEvent(
 {
   /* Pointer events might fire when changing windows for a device which is set 
to use Wintab, even
    * when when Wintab is left enabled but set to the bottom of Wintab overlap 
order. */
-  if (!window->useTabletAPI(GHOST_kTabletNative)) {
+  if (!window->useTabletAPI(GHOST_kTabletWinPointer)) {
     return;
   }
 
@@ -1276,7 +1276,7 @@ void GHOST_SystemWin32::setTabletAPI(GHOST_TTabletAPI api)
   /* If API is set to Windows Ink, unload Wintab so that trouble drivers don't 
disable Windows Ink.
    * Load Wintab when API is Automatic because decision logic relies on 
knowing whether a Wintab
    * device is present. */
-  const bool loadWintab = GHOST_kTabletNative != api;
+  const bool loadWintab = GHOST_kTabletWinPointer != api;
   GHOST_WindowManager *wm = getWindowManager();
 
   for (GHOST_IWindow *win : wm->getWindows()) {
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp 
b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 1ff7bfe8415..07120a7772c 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -214,7 +214,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 
*system,
   }
 
   // Initialize Wintab
-  if (system->getTabletAPI() != GHOST_kTabletNative) {
+  if (system->getTabletAPI() != GHOST_kTabletWinPointer) {
     loadWintab(GHOST_kWindowStateMinimized != state);
   }
 
@@ -974,7 +974,7 @@ bool GHOST_WindowWin32::useTabletAPI(GHOST_TTabletAPI api) 
const
       return api == GHOST_kTabletWintab;
     }
     else {
-      return api == GHOST_kTabletNative;
+      return api == GHOST_kTabletWinPointer;
     }
   }
   else {
diff --git a/source/blender/windowmanager/intern/wm_window.c 
b/source/blender/windowmanager/intern/wm_window.c
index 6aedfb10dde..ae5a2c81582 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -2080,7 +2080,7 @@ void WM_init_tablet_api(void)
   if (g_system) {
     switch (U.tablet_api) {
       case USER_TABLET_NATIVE:
-        GHOST_SetTabletAPI(g_system, GHOST_kTabletNative);
+        GHOST_SetTabletAPI(g_system, GHOST_kTabletWinPointer);
         break;
       case USER_TABLET_WINTAB:
         GHOST_SetTabletAPI(g_system, GHOST_kTabletWintab);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to