소스 검색

wayland: Don't overwrite error message from SDL_EGL_CreateSurface

SDL_EGL_CreateSurface sets a more specific error message, so overwriting
it would lose information.

Signed-off-by: Simon McVittie <[email protected]>
Simon McVittie 3 년 전
부모
커밋
b4d28085bf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/video/wayland/SDL_waylandwindow.c

+ 1 - 1
src/video/wayland/SDL_waylandwindow.c

@@ -1325,7 +1325,7 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
         data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window);
 
         if (data->egl_surface == EGL_NO_SURFACE) {
-            return SDL_SetError("failed to create an EGL window surface");
+            return -1;    /* SDL_EGL_CreateSurface should have set error */
         }
 #endif
     }