You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
[Windows] Make Windows Ink tablet API default, add dummy driver to disable tablet input.
This commit is contained in:
@@ -4606,6 +4606,22 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
|
||||
}
|
||||
}
|
||||
|
||||
// Note: Windows Ink API for pen input, available on Windows 8+ only.
|
||||
// Note: DPI conversion API, available on Windows 8.1+ only.
|
||||
HMODULE user32_lib = LoadLibraryW(L"user32.dll");
|
||||
if (user32_lib) {
|
||||
win8p_GetPointerType = (GetPointerTypePtr)GetProcAddress(user32_lib, "GetPointerType");
|
||||
win8p_GetPointerPenInfo = (GetPointerPenInfoPtr)GetProcAddress(user32_lib, "GetPointerPenInfo");
|
||||
win81p_LogicalToPhysicalPointForPerMonitorDPI = (LogicalToPhysicalPointForPerMonitorDPIPtr)GetProcAddress(user32_lib, "LogicalToPhysicalPointForPerMonitorDPI");
|
||||
win81p_PhysicalToLogicalPointForPerMonitorDPI = (PhysicalToLogicalPointForPerMonitorDPIPtr)GetProcAddress(user32_lib, "PhysicalToLogicalPointForPerMonitorDPI");
|
||||
|
||||
winink_available = win8p_GetPointerType && win8p_GetPointerPenInfo;
|
||||
}
|
||||
|
||||
if (winink_available) {
|
||||
tablet_drivers.push_back("winink");
|
||||
}
|
||||
|
||||
// Note: Wacom WinTab driver API for pen input, for devices incompatible with Windows Ink.
|
||||
HMODULE wintab_lib = LoadLibraryW(L"wintab32.dll");
|
||||
if (wintab_lib) {
|
||||
@@ -4622,21 +4638,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
|
||||
tablet_drivers.push_back("wintab");
|
||||
}
|
||||
|
||||
// Note: Windows Ink API for pen input, available on Windows 8+ only.
|
||||
// Note: DPI conversion API, available on Windows 8.1+ only.
|
||||
HMODULE user32_lib = LoadLibraryW(L"user32.dll");
|
||||
if (user32_lib) {
|
||||
win8p_GetPointerType = (GetPointerTypePtr)GetProcAddress(user32_lib, "GetPointerType");
|
||||
win8p_GetPointerPenInfo = (GetPointerPenInfoPtr)GetProcAddress(user32_lib, "GetPointerPenInfo");
|
||||
win81p_LogicalToPhysicalPointForPerMonitorDPI = (LogicalToPhysicalPointForPerMonitorDPIPtr)GetProcAddress(user32_lib, "LogicalToPhysicalPointForPerMonitorDPI");
|
||||
win81p_PhysicalToLogicalPointForPerMonitorDPI = (PhysicalToLogicalPointForPerMonitorDPIPtr)GetProcAddress(user32_lib, "PhysicalToLogicalPointForPerMonitorDPI");
|
||||
|
||||
winink_available = win8p_GetPointerType && win8p_GetPointerPenInfo;
|
||||
}
|
||||
|
||||
if (winink_available) {
|
||||
tablet_drivers.push_back("winink");
|
||||
}
|
||||
tablet_drivers.push_back("dummy");
|
||||
|
||||
if (OS::get_singleton()->is_hidpi_allowed()) {
|
||||
HMODULE Shcore = LoadLibraryW(L"Shcore.dll");
|
||||
|
||||
Reference in New Issue
Block a user