From 2de82b8ea82fa36c203963260484d58ed2b7c23c Mon Sep 17 00:00:00 2001 From: lixianjing Date: Sat, 9 Nov 2024 11:24:12 +0800 Subject: [PATCH] add log --- src/native_window/native_window_sdl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/native_window/native_window_sdl.c b/src/native_window/native_window_sdl.c index 5e5e40ea5e..46424e4721 100644 --- a/src/native_window/native_window_sdl.c +++ b/src/native_window/native_window_sdl.c @@ -578,6 +578,10 @@ static native_window_t* native_window_create_internal(const char* title, uint32_ #ifdef WITH_GPU_GL sdl->context = SDL_GL_CreateContext(sdl->window); + if (sdl->context == NULL) { + log_debug("SDL_GL_CreateContext failed: %s\n", SDL_GetError()); + assert(!"SDL_GL_CreateContext failed"); + } SDL_GL_SetSwapInterval(1); #endif /*WITH_GPU_GL*/