summaryrefslogtreecommitdiffhomepage
path: root/src/rcore.c
diff options
context:
space:
mode:
authorRay <[email protected]>2023-02-21 23:10:03 +0100
committerRay <[email protected]>2023-02-21 23:10:03 +0100
commitb4d824d6fcdbfb64023664ebd1c9b258d021a0cc (patch)
tree6995cc9f9d8eb027dd7daf1e87e5a8e49a93bdf2 /src/rcore.c
parent8169d0eab249c0a639bca16c721f8bfe1b3ef4b1 (diff)
downloadraylib-b4d824d6fcdbfb64023664ebd1c9b258d021a0cc.tar.gz
raylib-b4d824d6fcdbfb64023664ebd1c9b258d021a0cc.zip
REVIEWED: `GetMonitorWidth()` and `GetMonitorHeight()` #2934
Diffstat (limited to 'src/rcore.c')
-rw-r--r--src/rcore.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rcore.c b/src/rcore.c
index 327921fe..807d58f9 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -1832,6 +1832,12 @@ int GetMonitorWidth(int 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;
}
@@ -1851,6 +1857,12 @@ int GetMonitorHeight(int 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;
}