瀏覽代碼

SDL3: Fixed Cocoa_GL_CreateContext() not returning a context on success (#11181)

Rusty Moyher 1 年之前
父節點
當前提交
7556c44796
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/cocoa/SDL_cocoaopengl.m

+ 1 - 1
src/video/cocoa/SDL_cocoaopengl.m

@@ -286,7 +286,7 @@ SDL_GLContext Cocoa_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window)
             _this->GL_SwapWindow = Cocoa_GLES_SwapWindow;
             _this->GL_SwapWindow = Cocoa_GLES_SwapWindow;
             _this->GL_DestroyContext = Cocoa_GLES_DestroyContext;
             _this->GL_DestroyContext = Cocoa_GLES_DestroyContext;
 
 
-            if (Cocoa_GLES_LoadLibrary(_this, NULL) != 0) {
+            if (!Cocoa_GLES_LoadLibrary(_this, NULL)) {
                 return NULL;
                 return NULL;
             }
             }
             return Cocoa_GLES_CreateContext(_this, window);
             return Cocoa_GLES_CreateContext(_this, window);