Skip to content

Commit 0c6a4a7

Browse files
committed
Add hint to allow only landscape orientation on android.
Seems to fix that running in portrait mode bug.
1 parent 54722c4 commit 0c6a4a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
9292
// Switch SDL disables this hint by default: https://github.com/devkitPro/SDL/pull/55#issuecomment-633775255
9393
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "1");
9494

95+
#ifdef ANDROID
96+
SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
97+
#endif
98+
9599
#ifndef MOBILE_STK
96100
// Prevent fullscreen minimizes when losing focus
97101
if (CreationParams.Fullscreen)

0 commit comments

Comments
 (0)