Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 2, 2023
1 parent 38c63af commit ebf2c49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/video/uikit/SDL_uikitview.m
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ - (void)pressesBegan:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)eve
SDL_SendKeyboardKey(SDL_PRESSED, scancode);
}
}
if (SDL_TextInputActive()) {
if (SDL_IsTextInputActive()) {
[super pressesBegan:presses withEvent:event];
}
}
Expand All @@ -425,7 +425,7 @@ - (void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)eve
SDL_SendKeyboardKey(SDL_RELEASED, scancode);
}
}
if (SDL_TextInputActive()) {
if (SDL_IsTextInputActive()) {
[super pressesEnded:presses withEvent:event];
}
}
Expand All @@ -438,15 +438,15 @@ - (void)pressesCancelled:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *
SDL_SendKeyboardKey(SDL_RELEASED, scancode);
}
}
if (SDL_TextInputActive()) {
if (SDL_IsTextInputActive()) {
[super pressesCancelled:presses withEvent:event];
}
}

- (void)pressesChanged:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
{
/* This is only called when the force of a press changes. */
if (SDL_TextInputActive()) {
if (SDL_IsTextInputActive()) {
[super pressesChanged:presses withEvent:event];
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/video/uikit/SDL_uikitviewcontroller.m
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ - (void)keyboardWillShow:(NSNotification *)notification
{
BOOL shouldStartTextInput = NO;

if (!SDL_TextInputActive() && !hidingKeyboard && !rotatingOrientation) {
if (!SDL_IsTextInputActive() && !hidingKeyboard && !rotatingOrientation) {
shouldStartTextInput = YES;
}

Expand Down Expand Up @@ -434,7 +434,7 @@ - (void)keyboardWillHide:(NSNotification *)notification
{
BOOL shouldStopTextInput = NO;

if (SDL_TextInputActive() && !showingKeyboard && !rotatingOrientation) {
if (SDL_IsTextInputActive() && !showingKeyboard && !rotatingOrientation) {
shouldStopTextInput = YES;
}

Expand Down

0 comments on commit ebf2c49

Please sign in to comment.