mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 06:45:59 +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:
@@ -552,13 +552,8 @@ UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window)
|
||||
}
|
||||
}
|
||||
|
||||
void UIKit_SetTextInputRect(_THIS, const SDL_Rect *rect)
|
||||
int UIKit_SetTextInputRect(_THIS, const SDL_Rect *rect)
|
||||
{
|
||||
if (!rect) {
|
||||
SDL_InvalidParamError("rect");
|
||||
return;
|
||||
}
|
||||
|
||||
@autoreleasepool {
|
||||
SDL_uikitviewcontroller *vc = GetWindowViewController(SDL_GetFocusWindow());
|
||||
if (vc != nil) {
|
||||
@@ -569,6 +564,7 @@ void UIKit_SetTextInputRect(_THIS, const SDL_Rect *rect)
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SDL_IPHONE_KEYBOARD */
|
||||
|
Reference in New Issue
Block a user