Windows: add support for Windows Ink.
Before this Blender always needed the Wintab driver. This adds support for the native pressure API in Windows 8+, making it possible to get pressure sensitivity on e.g. Microsoft Surface hardware without any extra drivers. By default Blender will automatically use Wintab if available, and if not use Windows Ink instead. There is also a new user preference to explicitly specify which API to use if automatic detection fails. Fixes T57869: no pressure sensitivity with Surface pen or laptop. Code by Christopher Peerman with some tweaks by Brecht Van Lommel. Differential Revision: https://developer.blender.org/D4165
This commit is contained in:
committed by
Brecht Van Lommel
parent
eaf282b375
commit
4693207918
@@ -52,10 +52,11 @@ GHOST_System::GHOST_System()
|
||||
m_displayManager(NULL),
|
||||
m_timerManager(NULL),
|
||||
m_windowManager(NULL),
|
||||
m_eventManager(NULL)
|
||||
m_eventManager(NULL),
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
, m_ndofManager(0)
|
||||
m_ndofManager(0),
|
||||
#endif
|
||||
m_tabletAPI(GHOST_kTabletAutomatic)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -297,6 +298,16 @@ GHOST_TSuccess GHOST_System::getButtonState(GHOST_TButtonMask mask, bool& isDown
|
||||
return success;
|
||||
}
|
||||
|
||||
void GHOST_System::setTabletAPI(GHOST_TTabletAPI api)
|
||||
{
|
||||
m_tabletAPI = api;
|
||||
}
|
||||
|
||||
bool GHOST_System::useTabletAPI(GHOST_TTabletAPI api) const
|
||||
{
|
||||
return (m_tabletAPI == GHOST_kTabletAutomatic || m_tabletAPI == api);
|
||||
}
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
void GHOST_System::setNDOFDeadZone(float deadzone)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user