diff options
| author | Le Juez Victor <[email protected]> | 2023-10-14 15:11:56 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-14 15:11:56 +0200 |
| commit | 2498170b9525df447f63da4056e5c8c0e6d1d8fc (patch) | |
| tree | d7823349ebab18370807faa225e763b77bedd516 /src | |
| parent | d31b439e04d311ea8068a1d20d573b73c812c645 (diff) | |
| download | raylib-2498170b9525df447f63da4056e5c8c0e6d1d8fc.tar.gz raylib-2498170b9525df447f63da4056e5c8c0e6d1d8fc.zip | |
Fix screen size check in `InitPlatform()` (#3415)
Diffstat (limited to 'src')
| -rw-r--r-- | src/rcore_android.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rcore_android.c b/src/rcore_android.c index 3e3b8cd1..b7680adb 100644 --- a/src/rcore_android.c +++ b/src/rcore_android.c @@ -611,7 +611,7 @@ void PollInputEvents(void) static int InitPlatform(void) { CORE.Window.currentFbo.width = CORE.Window.screen.width; - CORE.Window.currentFbo.height = CORE.Window.screen.width; + CORE.Window.currentFbo.height = CORE.Window.screen.height; // Set desired windows flags before initializing anything ANativeActivity_setWindowFlags(platform.app->activity, AWINDOW_FLAG_FULLSCREEN, 0); //AWINDOW_FLAG_SCALED, AWINDOW_FLAG_DITHER @@ -622,7 +622,7 @@ static int InitPlatform(void) else if (orientation == ACONFIGURATION_ORIENTATION_LAND) TRACELOG(LOG_INFO, "ANDROID: Window orientation set as landscape"); // TODO: Automatic orientation doesn't seem to work - if (width <= height) + if (CORE.Window.screen.width <= CORE.Window.screen.height) { AConfiguration_setOrientation(platform.app->config, ACONFIGURATION_ORIENTATION_PORT); TRACELOG(LOG_WARNING, "ANDROID: Window orientation changed to portrait"); |
