mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Refactor apple_platform variable
This commit is contained in:
parent
54c6c3eb01
commit
1afdb5cb92
@ -116,8 +116,6 @@ void get_ios_version(int *major, int *minor);
|
||||
|
||||
#endif
|
||||
|
||||
extern id<RetroArch_Platform> apple_platform;
|
||||
|
||||
extern void apple_display_alert(const char *message, const char *title);
|
||||
|
||||
|
||||
|
@ -28,11 +28,11 @@
|
||||
#include "../../input/drivers/cocoa_input.h"
|
||||
#include "../../frontend/frontend.h"
|
||||
|
||||
id<RetroArch_Platform> apple_platform;
|
||||
static id apple_platform;
|
||||
|
||||
void apple_rarch_exited(void)
|
||||
{
|
||||
[apple_platform unloadingCore];
|
||||
[[NSApplication sharedApplication] terminate:nil];
|
||||
}
|
||||
|
||||
@interface RApplication : NSApplication
|
||||
@ -158,7 +158,6 @@ static char** waiting_argv;
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
apple_platform = self;
|
||||
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
[self.window setCollectionBehavior:[self.window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
@ -305,7 +304,6 @@ static void poll_iteration(void)
|
||||
|
||||
- (void)unloadingCore
|
||||
{
|
||||
[[NSApplication sharedApplication] terminate:nil];
|
||||
}
|
||||
|
||||
- (IBAction)showCoresDirectory:(id)sender
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "../../input/drivers_hid/btstack_hid.h"
|
||||
#include "../../frontend/frontend.h"
|
||||
|
||||
id<RetroArch_Platform> apple_platform;
|
||||
static id apple_platform;
|
||||
static CFRunLoopObserverRef iterate_observer;
|
||||
|
||||
static void rarch_draw(CFRunLoopObserverRef observer,
|
||||
@ -63,7 +63,10 @@ static void rarch_draw(CFRunLoopObserverRef observer,
|
||||
|
||||
void apple_rarch_exited(void)
|
||||
{
|
||||
[apple_platform unloadingCore];
|
||||
RetroArch_iOS *ap = (RetroArch_iOS *)apple_platform;
|
||||
|
||||
if (ap)
|
||||
[ap unloadingCore];
|
||||
}
|
||||
|
||||
apple_frontend_settings_t apple_frontend_settings;
|
||||
|
Loading…
x
Reference in New Issue
Block a user