Fixed scrolling wheel direction
This commit is contained in:
@@ -1007,19 +1007,6 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouseWheel) (JNIEnv* env, jobject thiz,
|
|||||||
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_RELEASED, TranslateKey(KEYCODE_DPAD_LEFT) );
|
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_RELEASED, TranslateKey(KEYCODE_DPAD_LEFT) );
|
||||||
}
|
}
|
||||||
for( ; scrollY > 0; scrollY-- )
|
for( ; scrollY > 0; scrollY-- )
|
||||||
{
|
|
||||||
if(!isMouseUsed)
|
|
||||||
{
|
|
||||||
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_PRESSED, TranslateKey(KEYCODE_DPAD_DOWN) );
|
|
||||||
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_RELEASED, TranslateKey(KEYCODE_DPAD_DOWN) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SDL_ANDROID_MainThreadPushMouseButton( SDL_PRESSED, SDL_BUTTON_WHEELDOWN );
|
|
||||||
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_WHEELDOWN );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for( ; scrollY < 0; scrollY++ )
|
|
||||||
{
|
{
|
||||||
if(!isMouseUsed)
|
if(!isMouseUsed)
|
||||||
{
|
{
|
||||||
@@ -1032,6 +1019,19 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouseWheel) (JNIEnv* env, jobject thiz,
|
|||||||
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_WHEELUP );
|
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_WHEELUP );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for( ; scrollY < 0; scrollY++ )
|
||||||
|
{
|
||||||
|
if(!isMouseUsed)
|
||||||
|
{
|
||||||
|
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_PRESSED, TranslateKey(KEYCODE_DPAD_DOWN) );
|
||||||
|
SDL_ANDROID_MainThreadPushKeyboardKey( SDL_RELEASED, TranslateKey(KEYCODE_DPAD_DOWN) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SDL_ANDROID_MainThreadPushMouseButton( SDL_PRESSED, SDL_BUTTON_WHEELDOWN );
|
||||||
|
SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_WHEELDOWN );
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user