From 9a686aaa565b261b6f01d625d624d6f9dd216f09 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 7 Apr 2015 22:49:56 -0400 Subject: [PATCH] Wayland: changed a few "SetError(); return -1;" to "return SetError()". --- src/video/wayland/SDL_waylandmouse.c | 3 +-- src/video/wayland/SDL_waylandvideo.c | 3 +-- src/video/wayland/SDL_waylandwindow.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c index 338f42f87..85f037598 100644 --- a/src/video/wayland/SDL_waylandmouse.c +++ b/src/video/wayland/SDL_waylandmouse.c @@ -356,8 +356,7 @@ Wayland_WarpMouseGlobal(int x, int y) static int Wayland_SetRelativeMouseMode(SDL_bool enabled) { - SDL_Unsupported(); - return -1; + return SDL_Unsupported(); } void diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index 3fb741b7b..41f3c270a 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -324,8 +324,7 @@ Wayland_GetDisplayModes(_THIS, SDL_VideoDisplay *sdl_display) static int Wayland_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) { - SDL_SetError("SetDisplayMode not (yet?) supported on Wayland."); - return -1; + return SDL_Unsupported(); } void diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 125cf82ef..b66508f3f 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -186,8 +186,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) { - SDL_SetError("failed to create a window surface"); - return -1; + return SDL_SetError("failed to create a window surface");; } if (data->shell_surface) {