From faf2516d563227aff5dc602739f6ff4841b50a58 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 23 Feb 2025 09:21:00 +1100 Subject: [PATCH] EGL: Use default depth/visual with X11 build --- src/Platform_Posix.c | 1 + src/Window_X11.c | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Platform_Posix.c b/src/Platform_Posix.c index e463e4e73..065927a45 100644 --- a/src/Platform_Posix.c +++ b/src/Platform_Posix.c @@ -641,6 +641,7 @@ void Platform_LoadSysFonts(void) { Platform_Log1("Searching for fonts in %s", &dirs[i]); Directory_Enum(&dirs[i], NULL, FontDirCallback); } + Platform_LogConst("Finished searching for fonts"); } diff --git a/src/Window_X11.c b/src/Window_X11.c index cff404f73..ab615938e 100644 --- a/src/Window_X11.c +++ b/src/Window_X11.c @@ -1426,17 +1426,7 @@ void Window_DisableRawMouse(void) { *#########################################################################################################################*/ #if CC_GFX_BACKEND_IS_GL() && defined CC_BUILD_EGL static XVisualInfo GLContext_SelectVisual(void) { - XVisualInfo info = { 0 }; - cc_result res; - int screen = DefaultScreen(win_display); - - if (XMatchVisualInfo(win_display, screen, 24, TrueColor, &info)) return info; - if (XMatchVisualInfo(win_display, screen, 32, TrueColor, &info)) return info; - - Platform_LogConst("Can't find 24 or 32 bit visual, trying default.."); - info.depth = DefaultDepth(win_display, screen); - info.visual = DefaultVisual(win_display, screen); - return info; + return Select2DVisual(); } #endif