Skip to content

Commit

Permalink
Add hint to allow only landscape orientation on android.
Browse files Browse the repository at this point in the history
Seems to fix that running in portrait mode bug.
  • Loading branch information
deveee committed Jul 28, 2024
1 parent 54722c4 commit 0c6a4a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
// Switch SDL disables this hint by default: https://github.com/devkitPro/SDL/pull/55#issuecomment-633775255
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "1");

#ifdef ANDROID
SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
#endif

#ifndef MOBILE_STK
// Prevent fullscreen minimizes when losing focus
if (CreationParams.Fullscreen)
Expand Down

0 comments on commit 0c6a4a7

Please sign in to comment.