Skip to content

Commit a35f91d

Browse files
authored
apple: AppIntents (Siri, Shortcuts) (libretro#18167)
1 parent 9c9f5aa commit a35f91d

File tree

19 files changed

+1137
-51
lines changed

19 files changed

+1137
-51
lines changed

frontend/drivers/platform_darwin.m

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@
6161
#include "../../menu/menu_driver.h"
6262
#endif
6363

64+
#ifdef HAVE_SWIFT
65+
#if TARGET_OS_TV
66+
#import "RetroArchTV-Swift.h"
67+
#else
68+
#import "RetroArch-Swift.h"
69+
#endif
70+
#endif
71+
6472
#include "../frontend_driver.h"
6573
#include "../../file_path_special.h"
6674
#include "../../configuration.h"
@@ -987,6 +995,15 @@ static bool frontend_darwin_accessibility_speak(int speed,
987995
#endif
988996
}
989997

998+
static void frontend_darwin_content_loaded(void)
999+
{
1000+
#ifdef HAVE_SWIFT
1001+
if (@available(iOS 16.0, tvOS 16.0, *)) {
1002+
[RetroArchAppShortcuts contentLoaded];
1003+
}
1004+
#endif
1005+
}
1006+
9901007
frontend_ctx_driver_t frontend_ctx_darwin = {
9911008
frontend_darwin_get_env, /* get_env */
9921009
NULL, /* init */
@@ -999,7 +1016,7 @@ static bool frontend_darwin_accessibility_speak(int speed,
9991016
frontend_darwin_get_name, /* get_name */
10001017
frontend_darwin_get_os, /* get_os */
10011018
frontend_darwin_get_rating, /* get_rating */
1002-
NULL, /* content_loaded */
1019+
frontend_darwin_content_loaded, /* content_loaded */
10031020
frontend_darwin_get_arch, /* get_architecture */
10041021
frontend_darwin_get_powerstate, /* get_powerstate */
10051022
frontend_darwin_parse_drive_list,/* parse_drive_list */

griffin/griffin_objc.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#if defined(HAVE_COCOATOUCH) || defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)
3333

3434
#include "../ui/drivers/cocoa/cocoa_common.m"
35+
#include "../ui/drivers/cocoa/RetroArchPlaylistManager.m"
3536
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
3637
#include "../gfx/drivers_context/cocoa_gl_ctx.m"
3738
#endif

0 commit comments

Comments
 (0)