mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 13:14:33 +00:00
update sdl2 to release https://github.com/spurious/SDL-mirror/tree/release-2.0.14
This commit is contained in:
parent
52ecd8bb0f
commit
77fc164e96
675 changed files with 192770 additions and 60506 deletions
|
|
@ -436,6 +436,12 @@ public:
|
|||
g_JVM->AttachCurrentThread( &env, NULL );
|
||||
pthread_setspecific( g_ThreadKey, (void*)env );
|
||||
|
||||
if ( !g_HIDDeviceManagerCallbackHandler )
|
||||
{
|
||||
LOGV( "Device open without callback handler" );
|
||||
return false;
|
||||
}
|
||||
|
||||
m_bIsWaitingForOpen = false;
|
||||
m_bOpenResult = env->CallBooleanMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerOpen, m_nId );
|
||||
ExceptionCheck( env, "BOpen" );
|
||||
|
|
@ -545,11 +551,18 @@ public:
|
|||
g_JVM->AttachCurrentThread( &env, NULL );
|
||||
pthread_setspecific( g_ThreadKey, (void*)env );
|
||||
|
||||
jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
|
||||
int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendOutputReport, m_nId, pBuf );
|
||||
ExceptionCheck( env, "SendOutputReport" );
|
||||
|
||||
env->DeleteLocalRef( pBuf );
|
||||
int nRet = -1;
|
||||
if ( g_HIDDeviceManagerCallbackHandler )
|
||||
{
|
||||
jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
|
||||
nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendOutputReport, m_nId, pBuf );
|
||||
ExceptionCheck( env, "SendOutputReport" );
|
||||
env->DeleteLocalRef( pBuf );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGV( "SendOutputReport without callback handler" );
|
||||
}
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
|
@ -560,10 +573,18 @@ public:
|
|||
g_JVM->AttachCurrentThread( &env, NULL );
|
||||
pthread_setspecific( g_ThreadKey, (void*)env );
|
||||
|
||||
jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
|
||||
int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendFeatureReport, m_nId, pBuf );
|
||||
ExceptionCheck( env, "SendFeatureReport" );
|
||||
env->DeleteLocalRef( pBuf );
|
||||
int nRet = -1;
|
||||
if ( g_HIDDeviceManagerCallbackHandler )
|
||||
{
|
||||
jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
|
||||
nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendFeatureReport, m_nId, pBuf );
|
||||
ExceptionCheck( env, "SendFeatureReport" );
|
||||
env->DeleteLocalRef( pBuf );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGV( "SendFeatureReport without callback handler" );
|
||||
}
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
|
@ -587,6 +608,12 @@ public:
|
|||
g_JVM->AttachCurrentThread( &env, NULL );
|
||||
pthread_setspecific( g_ThreadKey, (void*)env );
|
||||
|
||||
if ( !g_HIDDeviceManagerCallbackHandler )
|
||||
{
|
||||
LOGV( "GetFeatureReport without callback handler" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
{
|
||||
hid_mutex_guard cvl( &m_cvLock );
|
||||
if ( m_bIsWaitingForFeatureReport )
|
||||
|
|
@ -657,8 +684,11 @@ public:
|
|||
g_JVM->AttachCurrentThread( &env, NULL );
|
||||
pthread_setspecific( g_ThreadKey, (void*)env );
|
||||
|
||||
env->CallVoidMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerClose, m_nId );
|
||||
ExceptionCheck( env, "Close" );
|
||||
if ( g_HIDDeviceManagerCallbackHandler )
|
||||
{
|
||||
env->CallVoidMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerClose, m_nId );
|
||||
ExceptionCheck( env, "Close" );
|
||||
}
|
||||
|
||||
hid_mutex_guard dataLock( &m_dataLock );
|
||||
m_vecData.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue