Skip to content

Commit 05ba358

Browse files
committed
Output platform selected by GLFW to TRACELOG
1 parent 6a58cbb commit 05ba358

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/platforms/rcore_desktop.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,17 @@ int InitPlatform(void)
15701570
CORE.Storage.basePath = GetWorkingDirectory();
15711571
//----------------------------------------------------------------------------
15721572

1573+
char* glfwPlatform = "";
1574+
switch (glfwGetPlatform())
1575+
{
1576+
case GLFW_PLATFORM_WIN32: glfwPlatform = "Win32"; break;
1577+
case GLFW_PLATFORM_COCOA: glfwPlatform = "Cocoa"; break;
1578+
case GLFW_PLATFORM_WAYLAND: glfwPlatform = "Wayland"; break;
1579+
case GLFW_PLATFORM_X11: glfwPlatform = "X11"; break;
1580+
case GLFW_PLATFORM_NULL: glfwPlatform = "Null"; break;
1581+
}
1582+
1583+
TRACELOG(LOG_INFO, "GLFW platform: %s", glfwPlatform);
15731584
TRACELOG(LOG_INFO, "PLATFORM: DESKTOP (GLFW): Initialized successfully");
15741585

15751586
return 0;

0 commit comments

Comments
 (0)