mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
tvOS: Add target conditionals to fix tvOS build (#15637)
* Add target conditionals to fix tvOS build * Use TARGET_OS_IOS for iOS
This commit is contained in:
parent
34b71339de
commit
6b0a5c978e
@ -50,6 +50,7 @@ extension CocoaView: HelperBarActionDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func orientationLockButtonTapped() {
|
func orientationLockButtonTapped() {
|
||||||
|
#if TARGET_OS_IOS
|
||||||
shouldLockCurrentInterfaceOrientation.toggle()
|
shouldLockCurrentInterfaceOrientation.toggle()
|
||||||
if shouldLockCurrentInterfaceOrientation {
|
if shouldLockCurrentInterfaceOrientation {
|
||||||
let currentOrientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation ?? UIInterfaceOrientation.portrait
|
let currentOrientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation ?? UIInterfaceOrientation.portrait
|
||||||
@ -58,6 +59,7 @@ extension CocoaView: HelperBarActionDelegate {
|
|||||||
if #available(iOS 16, *) {
|
if #available(iOS 16, *) {
|
||||||
setNeedsUpdateOfSupportedInterfaceOrientations()
|
setNeedsUpdateOfSupportedInterfaceOrientations()
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
var isKeyboardEnabled: Bool {
|
var isKeyboardEnabled: Bool {
|
||||||
|
@ -68,8 +68,10 @@
|
|||||||
@property(nonatomic,strong) UIView *helperBarView;
|
@property(nonatomic,strong) UIView *helperBarView;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS
|
||||||
@property(readwrite) BOOL shouldLockCurrentInterfaceOrientation;
|
@property(readwrite) BOOL shouldLockCurrentInterfaceOrientation;
|
||||||
@property(readwrite) UIInterfaceOrientation lockInterfaceOrientation;
|
@property(readwrite) UIInterfaceOrientation lockInterfaceOrientation;
|
||||||
|
#endif
|
||||||
|
|
||||||
+ (CocoaView*)get;
|
+ (CocoaView*)get;
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user