Update RingRayLib - raylib.c - Add Function : int GetMonitorWidth(int monitor)
@@ -251,6 +251,20 @@ RING_FUNC(ring_GetMonitorCount)
RING_API_RETNUMBER(GetMonitorCount());
}
+
+RING_FUNC(ring_GetMonitorWidth)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(GetMonitorWidth( (int ) RING_API_GETNUMBER(1)));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -273,4 +287,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("getscreenwidth",ring_GetScreenWidth);
ring_vm_funcregister("getscreenheight",ring_GetScreenHeight);
ring_vm_funcregister("getmonitorcount",ring_GetMonitorCount);
+ ring_vm_funcregister("getmonitorwidth",ring_GetMonitorWidth);
}
