From b4d824d6fcdbfb64023664ebd1c9b258d021a0cc Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 21 Feb 2023 23:10:03 +0100 Subject: [PATCH] REVIEWED: `GetMonitorWidth()` and `GetMonitorHeight()` #2934 --- src/rcore.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/rcore.c b/src/rcore.c index 327921fec..807d58f91 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -1831,6 +1831,12 @@ int GetMonitorWidth(int monitor) else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor"); } else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor"); +#endif +#if defined(PLATFORM_ANDROID) + if (CORE.Android.app->window != NULL) + { + return ANativeWindow_getWidth(CORE.Android.app->window); + } #endif return 0; } @@ -1850,6 +1856,12 @@ int GetMonitorHeight(int monitor) else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor"); } else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor"); +#endif +#if defined(PLATFORM_ANDROID) + if (CORE.Android.app->window != NULL) + { + return ANativeWindow_getHeight(CORE.Android.app->window); + } #endif return 0; }