EGL: Use default depth/visual with X11 build

This commit is contained in:
UnknownShadow200 2025-02-23 09:21:00 +11:00
parent 2091c3cf69
commit faf2516d56
2 changed files with 2 additions and 11 deletions

View File

@ -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");
}

View File

@ -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