mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 11:57:24 +08:00
Revert "Stop beep when running iOS apps on ARM-based Macs"
This reverts commit bbf38bbbc3, which prevented text input from working when a hardware keyboard was connected, since key strokes don't get to the text input field.
Fixes https://github.com/libsdl-org/SDL/issues/7958
This commit is contained in:
@@ -417,6 +417,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
|||||||
SDL_SendKeyboardKey(UIKit_GetEventTimestamp([event timestamp]), SDL_PRESSED, scancode);
|
SDL_SendKeyboardKey(UIKit_GetEventTimestamp([event timestamp]), SDL_PRESSED, scancode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[super pressesBegan:presses withEvent:event];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
- (void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
||||||
@@ -427,6 +428,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
|||||||
SDL_SendKeyboardKey(UIKit_GetEventTimestamp([event timestamp]), SDL_RELEASED, scancode);
|
SDL_SendKeyboardKey(UIKit_GetEventTimestamp([event timestamp]), SDL_RELEASED, scancode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[super pressesEnded:presses withEvent:event];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)pressesCancelled:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
- (void)pressesCancelled:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
||||||
@@ -437,11 +439,13 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
|||||||
SDL_SendKeyboardKey(UIKit_GetEventTimestamp([event timestamp]), SDL_RELEASED, scancode);
|
SDL_SendKeyboardKey(UIKit_GetEventTimestamp([event timestamp]), SDL_RELEASED, scancode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[super pressesCancelled:presses withEvent:event];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)pressesChanged:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
- (void)pressesChanged:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
|
||||||
{
|
{
|
||||||
/* This is only called when the force of a press changes. */
|
/* This is only called when the force of a press changes. */
|
||||||
|
[super pressesChanged:presses withEvent:event];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* TARGET_OS_TV || defined(__IPHONE_9_1) */
|
#endif /* TARGET_OS_TV || defined(__IPHONE_9_1) */
|
||||||
|
|||||||
Reference in New Issue
Block a user