mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-01 19:44:40 +00:00
Change return type from void to int, for functions that set an error
(SDL_SetError(), SDL_OutOfMemory(), SDL_Unsupported(), SDL_InvalidParam()) Update prototype to forward errors to generic layer, for the functions: MoveCursor, WarpMouse, GL_DeleteContext, GetDisplayModes. Check invalid parameter in SDL_SetTextInputRect() generic layer.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
static SDL_Cursor *RPI_CreateDefaultCursor(void);
|
||||
static SDL_Cursor *RPI_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y);
|
||||
static int RPI_ShowCursor(SDL_Cursor *cursor);
|
||||
static void RPI_MoveCursor(SDL_Cursor *cursor);
|
||||
static int RPI_MoveCursor(SDL_Cursor *cursor);
|
||||
static void RPI_FreeCursor(SDL_Cursor *cursor);
|
||||
|
||||
static SDL_Cursor *global_cursor;
|
||||
@@ -283,9 +283,9 @@ static int RPI_WarpMouseGlobal(float x, float y)
|
||||
return RPI_WarpMouseGlobalGraphically(x, y);
|
||||
}
|
||||
|
||||
static void RPI_WarpMouse(SDL_Window *window, float x, float y)
|
||||
static int RPI_WarpMouse(SDL_Window *window, float x, float y)
|
||||
{
|
||||
RPI_WarpMouseGlobal(x, y);
|
||||
return RPI_WarpMouseGlobal(x, y);
|
||||
}
|
||||
|
||||
void RPI_InitMouse(_THIS)
|
||||
@@ -310,12 +310,12 @@ void RPI_QuitMouse(_THIS)
|
||||
}
|
||||
|
||||
/* This is called when a mouse motion event occurs */
|
||||
static void RPI_MoveCursor(SDL_Cursor *cursor)
|
||||
static int RPI_MoveCursor(SDL_Cursor *cursor)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
/* We must NOT call SDL_SendMouseMotion() on the next call or we will enter recursivity,
|
||||
* so we create a version of WarpMouseGlobal without it. */
|
||||
RPI_WarpMouseGlobalGraphically(mouse->x, mouse->y);
|
||||
return RPI_WarpMouseGlobalGraphically(mouse->x, mouse->y);
|
||||
}
|
||||
|
||||
#endif /* SDL_VIDEO_DRIVER_RPI */
|
||||
|
||||
@@ -61,7 +61,7 @@ struct SDL_WindowData
|
||||
/* Display and window functions */
|
||||
int RPI_VideoInit(_THIS);
|
||||
void RPI_VideoQuit(_THIS);
|
||||
void RPI_GetDisplayModes(_THIS, SDL_VideoDisplay *display);
|
||||
int RPI_GetDisplayModes(_THIS, SDL_VideoDisplay *display);
|
||||
int RPI_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode);
|
||||
int RPI_CreateWindow(_THIS, SDL_Window *window);
|
||||
int RPI_CreateWindowFrom(_THIS, SDL_Window *window, const void *data);
|
||||
@@ -86,6 +86,6 @@ int RPI_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context);
|
||||
int RPI_GLES_SetSwapInterval(_THIS, int interval);
|
||||
int RPI_GLES_GetSwapInterval(_THIS);
|
||||
int RPI_GLES_SwapWindow(_THIS, SDL_Window *window);
|
||||
void RPI_GLES_DeleteContext(_THIS, SDL_GLContext context);
|
||||
int RPI_GLES_DeleteContext(_THIS, SDL_GLContext context);
|
||||
|
||||
#endif /* SDL_rpivideo_h */
|
||||
|
||||
Reference in New Issue
Block a user