mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
Add GetMonitorWidth() and GetMonitorHeight() implementations for PLATFORM_WEB (#3636)
This commit is contained in:
@@ -572,15 +572,17 @@ Vector2 GetMonitorPosition(int monitor)
|
|||||||
// Get selected monitor width (currently used by monitor)
|
// Get selected monitor width (currently used by monitor)
|
||||||
int GetMonitorWidth(int monitor)
|
int GetMonitorWidth(int monitor)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "GetMonitorWidth() not implemented on target platform");
|
int w = 0;
|
||||||
return 0;
|
w = EM_ASM_INT( { return screen.width; }, 0);
|
||||||
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get selected monitor height (currently used by monitor)
|
// Get selected monitor height (currently used by monitor)
|
||||||
int GetMonitorHeight(int monitor)
|
int GetMonitorHeight(int monitor)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "GetMonitorHeight() not implemented on target platform");
|
int h = 0;
|
||||||
return 0;
|
h = EM_ASM_INT( { return screen.height; }, 0);
|
||||||
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get selected monitor physical width in millimetres
|
// Get selected monitor physical width in millimetres
|
||||||
|
Reference in New Issue
Block a user