mirror of
https://github.com/libretro/RetroArch
synced 2025-02-01 20:54:10 +00:00
4e24fb3d01
* Fix old osx condition Current code assumes that osx < 10.12 is equivalent to ppc osx. It's not true as Leopard x86 is still < 10.12 but not ppc. As xcode compiles fat binaries it includes osx x86 and compilation fails. * Disable crtswitchres when no c++11 is available Crtswitchres altually needs c++11. Since it's not that important to make it compatible with lower c++, just disable if no c++11 is available * Don't use firstObject on old Mac OS X. It was introduced in 10.6, so on old ones just implement it ourselves * Compile osx-ppc frontend * osx-ppc: Build a fat binary On 10.6 i386 xcode apparently refuses to build a pure ppc. Settle for a fat binary.
84 lines
2.1 KiB
Objective-C
84 lines
2.1 KiB
Objective-C
#ifndef COCOA_APPLE_PLATFORM_H
|
|
#define COCOA_APPLE_PLATFORM_H
|
|
|
|
#ifdef HAVE_METAL
|
|
#import <Metal/Metal.h>
|
|
#import <MetalKit/MetalKit.h>
|
|
#endif
|
|
|
|
#if defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH)
|
|
@interface WindowListener : NSResponder<NSWindowDelegate>
|
|
@end
|
|
#endif
|
|
|
|
#if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH)
|
|
@protocol ApplePlatform
|
|
|
|
/*! @brief renderView returns the current render view based on the viewType */
|
|
@property(readonly) id renderView;
|
|
/*! @brief isActive returns true if the application has focus */
|
|
@property(readonly) bool hasFocus;
|
|
@property(readwrite) apple_view_type_t viewType;
|
|
|
|
/*! @brief setVideoMode adjusts the video display to the specified mode */
|
|
- (void)setVideoMode:(gfx_ctx_mode_t)mode;
|
|
/*! @brief setCursorVisible specifies whether the cursor is visible */
|
|
- (void)setCursorVisible:(bool)v;
|
|
/*! @brief controls whether the screen saver should be disabled and
|
|
* the displays should not sleep.
|
|
*/
|
|
- (bool)setDisableDisplaySleep:(bool)disable;
|
|
@end
|
|
|
|
#endif
|
|
|
|
#if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH)
|
|
extern id<ApplePlatform> apple_platform;
|
|
|
|
id<ApplePlatform> apple_platform;
|
|
#else
|
|
id apple_platform;
|
|
#endif
|
|
|
|
#if defined(HAVE_COCOATOUCH)
|
|
@interface RetroArch_iOS : UINavigationController<ApplePlatform, UIApplicationDelegate,
|
|
UINavigationControllerDelegate> {
|
|
UIView *_renderView;
|
|
apple_view_type_t _vt;
|
|
}
|
|
|
|
@property (nonatomic) UIWindow* window;
|
|
@property (nonatomic) NSString* documentsDirectory;
|
|
@property (nonatomic) int menu_count;
|
|
|
|
+ (RetroArch_iOS*)get;
|
|
|
|
- (void)showGameView;
|
|
- (void)supportOtherAudioSessions;
|
|
|
|
- (void)refreshSystemConfig;
|
|
@end
|
|
#else
|
|
#if defined(HAVE_COCOA_METAL)
|
|
@interface RetroArch_OSX : NSObject<ApplePlatform, NSApplicationDelegate> {
|
|
#elif (defined(__MACH__) && defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED < 101200))
|
|
@interface RetroArch_OSX : NSObject {
|
|
#else
|
|
@interface RetroArch_OSX : NSObject<NSApplicationDelegate> {
|
|
#endif
|
|
NSWindow *_window;
|
|
apple_view_type_t _vt;
|
|
NSView *_renderView;
|
|
id _sleepActivity;
|
|
#if defined(HAVE_COCOA_METAL)
|
|
WindowListener *_listener;
|
|
#endif
|
|
}
|
|
|
|
@property(nonatomic, retain) NSWindow IBOutlet *window;
|
|
|
|
@end
|
|
#endif
|
|
|
|
#endif
|