mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-14 07:18:13 +00:00
Implemented SDL_GetDisplayOrientation() on Android (thanks Rachel!)
This commit is contained in:
@@ -135,6 +135,10 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)(
|
||||
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeEnvironmentVariablesSet)(
|
||||
JNIEnv* env, jclass cls);
|
||||
|
||||
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)(
|
||||
JNIEnv* env, jclass cls,
|
||||
jint orientation);
|
||||
|
||||
/* Java class SDLInputConnection */
|
||||
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText)(
|
||||
JNIEnv* env, jclass cls,
|
||||
@@ -535,6 +539,14 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)(
|
||||
Android_SetScreenResolution(surfaceWidth, surfaceHeight, deviceWidth, deviceHeight, format, rate);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)(
|
||||
JNIEnv *env, jclass jcls,
|
||||
jint orientation)
|
||||
{
|
||||
SDL_VideoDisplay *display = SDL_GetDisplay(0);
|
||||
SDL_SendDisplayEvent(display, SDL_DISPLAYEVENT_ORIENTATION, orientation);
|
||||
}
|
||||
|
||||
/* Paddown */
|
||||
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadDown)(
|
||||
JNIEnv* env, jclass jcls,
|
||||
|
Reference in New Issue
Block a user