mirror of
https://github.com/encounter/SDL.git
synced 2025-12-21 18:59:15 +00:00
make SDL_SetTextInputRect take a pointer to const
The documentation doesn't state that the argument is ever modified, and no implementation does so currently. This is a non-breaking change to guarantee as much to callers.
This commit is contained in:
@@ -29,7 +29,7 @@ extern void Cocoa_QuitKeyboard(_THIS);
|
||||
|
||||
extern void Cocoa_StartTextInput(_THIS);
|
||||
extern void Cocoa_StopTextInput(_THIS);
|
||||
extern void Cocoa_SetTextInputRect(_THIS, SDL_Rect *rect);
|
||||
extern void Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect);
|
||||
|
||||
extern void Cocoa_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
|
||||
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
SDL_Rect _inputRect;
|
||||
}
|
||||
- (void)doCommandBySelector:(SEL)myselector;
|
||||
- (void)setInputRect:(SDL_Rect *)rect;
|
||||
- (void)setInputRect:(const SDL_Rect *)rect;
|
||||
@end
|
||||
|
||||
@implementation SDLTranslatorResponder
|
||||
|
||||
- (void)setInputRect:(SDL_Rect *)rect
|
||||
- (void)setInputRect:(const SDL_Rect *)rect
|
||||
{
|
||||
_inputRect = *rect;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ Cocoa_StopTextInput(_THIS)
|
||||
}}
|
||||
|
||||
void
|
||||
Cocoa_SetTextInputRect(_THIS, SDL_Rect *rect)
|
||||
Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect)
|
||||
{
|
||||
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user