diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index 55706c591..a7c483116 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -424,6 +424,12 @@ void *GetWindowHandle(void) return NULL; } +void *GetPlatformHandle(void) +{ + TRACELOG(LOG_WARNING, "GetPlatformHandle() not implemented on target platform"); + return NULL; +} + // Get number of monitors int GetMonitorCount(void) { diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index c6685846c..fef93a071 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -721,6 +721,11 @@ void *GetWindowHandle(void) return NULL; } +void *GetPlatformHandle(void) +{ + return platform.handle; +} + // Get number of monitors int GetMonitorCount(void) { diff --git a/src/platforms/rcore_desktop_rgfw.c b/src/platforms/rcore_desktop_rgfw.c index 64ab432e6..dffa8d627 100644 --- a/src/platforms/rcore_desktop_rgfw.c +++ b/src/platforms/rcore_desktop_rgfw.c @@ -541,6 +541,12 @@ void *GetWindowHandle(void) #endif } +void *GetPlatformHandle(void) +{ + TRACELOG(LOG_WARNING, "GetPlatformHandle() not implemented on target platform"); + return NULL; +} + // Get number of monitors int GetMonitorCount(void) { diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index 794f9e6a0..73bea3a29 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -682,6 +682,12 @@ void *GetWindowHandle(void) return (void *)platform.window; } +void *GetPlatformHandle(void) +{ + TRACELOG(LOG_WARNING, "GetPlatformHandle() not implemented on target platform"); + return NULL; +} + // Get number of monitors int GetMonitorCount(void) { diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index ee2875838..0ccb30581 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -364,6 +364,12 @@ void *GetWindowHandle(void) return NULL; } +void *GetPlatformHandle(void) +{ + TRACELOG(LOG_WARNING, "GetPlatformHandle() not implemented on target platform"); + return NULL; +} + // Get number of monitors int GetMonitorCount(void) { diff --git a/src/platforms/rcore_template.c b/src/platforms/rcore_template.c index 938f4ed7d..39eabe16d 100644 --- a/src/platforms/rcore_template.c +++ b/src/platforms/rcore_template.c @@ -201,6 +201,12 @@ void *GetWindowHandle(void) return NULL; } +void *GetPlatformHandle(void) +{ + TRACELOG(LOG_WARNING, "GetPlatformHandle() not implemented on target platform"); + return NULL; +} + // Get number of monitors int GetMonitorCount(void) { diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index ff7a92dbc..bb9942535 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -655,6 +655,12 @@ void *GetWindowHandle(void) return NULL; } +void *GetPlatformHandle(void) +{ + TRACELOG(LOG_WARNING, "GetPlatformHandle() not implemented on target platform"); + return NULL; +} + // Get number of monitors int GetMonitorCount(void) { diff --git a/src/raylib.h b/src/raylib.h index 30ba8bd2a..fba51c727 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -984,6 +984,7 @@ RLAPI void SetWindowSize(int width, int height); // Set window RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) RLAPI void SetWindowFocused(void); // Set window focused (only PLATFORM_DESKTOP) RLAPI void *GetWindowHandle(void); // Get native window handle +RLAPI void *GetPlatformHandle(void); // Get platform handle (GLFWwindow*, only PLATFORM_DESKTOP) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)