From 86fa9b18a3619a379a597ca0902c23dc053cafc0 Mon Sep 17 00:00:00 2001 From: der richter Date: Tue, 27 Feb 2024 16:55:29 +0100 Subject: [PATCH] osdep/mac: make mac naming of files, folders and function consistent rename all macOS namings (osx, macosx, macOS, macos, apple) to mac, to make naming consistent. --- audio/out/ao_coreaudio_utils.h | 2 +- input/input.c | 2 +- meson.build | 40 +++++++++---------- options/path.c | 2 +- osdep/{language-apple.c => language-mac.c} | 2 +- .../application.h} | 8 ++-- .../application.m} | 14 +++---- .../application_objc.h} | 4 +- osdep/{macosx_events.h => mac/events.h} | 4 +- osdep/{macosx_events.m => mac/events.m} | 6 +-- .../events_objc.h} | 2 +- osdep/{macos => mac}/libmpv_helper.swift | 0 osdep/{macos => mac}/log_helper.swift | 0 osdep/{macosx_menubar.h => mac/menubar.h} | 6 +-- osdep/{macosx_menubar.m => mac/menubar.m} | 4 +- .../menubar_objc.h} | 2 +- osdep/{ => mac}/meson.build | 12 +++--- osdep/{macos => mac}/mpv_helper.swift | 0 osdep/{macos => mac}/precise_timer.swift | 0 .../remote_command_center.swift | 0 .../swift_bridge.h} | 4 +- osdep/{macos => mac}/swift_compat.swift | 0 osdep/{macos => mac}/swift_extensions.swift | 0 osdep/{macosx_touchbar.h => mac/touchbar.h} | 2 +- osdep/{macosx_touchbar.m => mac/touchbar.m} | 2 +- osdep/{main-fn-cocoa.c => main-fn-mac.c} | 2 +- osdep/{path-macosx.m => path-mac.m} | 2 +- osdep/path.h | 2 +- osdep/{semaphore_osx.c => semaphore-mac.c} | 0 osdep/threads-posix.h | 4 +- osdep/{apple_utils.c => utils-mac.c} | 2 +- osdep/{apple_utils.h => utils-mac.h} | 6 +-- player/main.c | 4 +- video/out/vo_libmpv.c | 2 +- video/out/vulkan/context_mac.m | 2 +- 35 files changed, 72 insertions(+), 72 deletions(-) rename osdep/{language-apple.c => language-mac.c} (98%) rename osdep/{macosx_application.h => mac/application.h} (91%) rename osdep/{macosx_application.m => mac/application.m} (97%) rename osdep/{macosx_application_objc.h => mac/application_objc.h} (94%) rename osdep/{macosx_events.h => mac/events.h} (95%) rename osdep/{macosx_events.m => mac/events.m} (99%) rename osdep/{macosx_events_objc.h => mac/events_objc.h} (97%) rename osdep/{macos => mac}/libmpv_helper.swift (100%) rename osdep/{macos => mac}/log_helper.swift (100%) rename osdep/{macosx_menubar.h => mac/menubar.h} (91%) rename osdep/{macosx_menubar.m => mac/menubar.m} (99%) rename osdep/{macosx_menubar_objc.h => mac/menubar_objc.h} (95%) rename osdep/{ => mac}/meson.build (81%) rename osdep/{macos => mac}/mpv_helper.swift (100%) rename osdep/{macos => mac}/precise_timer.swift (100%) rename osdep/{macos => mac}/remote_command_center.swift (100%) rename osdep/{macOS_swift_bridge.h => mac/swift_bridge.h} (96%) rename osdep/{macos => mac}/swift_compat.swift (100%) rename osdep/{macos => mac}/swift_extensions.swift (100%) rename osdep/{macosx_touchbar.h => mac/touchbar.h} (97%) rename osdep/{macosx_touchbar.m => mac/touchbar.m} (99%) rename osdep/{main-fn-cocoa.c => main-fn-mac.c} (89%) rename osdep/{path-macosx.m => path-mac.m} (95%) rename osdep/{semaphore_osx.c => semaphore-mac.c} (100%) rename osdep/{apple_utils.c => utils-mac.c} (97%) rename osdep/{apple_utils.h => utils-mac.h} (91%) diff --git a/audio/out/ao_coreaudio_utils.h b/audio/out/ao_coreaudio_utils.h index 0e2b8b1f64..c6f1a5ec24 100644 --- a/audio/out/ao_coreaudio_utils.h +++ b/audio/out/ao_coreaudio_utils.h @@ -27,7 +27,7 @@ #include "common/msg.h" #include "audio/out/ao.h" #include "internal.h" -#include "osdep/apple_utils.h" +#include "osdep/utils-mac.h" bool check_ca_st(struct ao *ao, int level, OSStatus code, const char *message); diff --git a/input/input.c b/input/input.c index cb58c9ba83..cafb40085b 100644 --- a/input/input.c +++ b/input/input.c @@ -50,7 +50,7 @@ #include "common/common.h" #if HAVE_COCOA -#include "osdep/macosx_events.h" +#include "osdep/mac/events.h" #endif #define input_lock(ictx) mp_mutex_lock(&ictx->mutex) diff --git a/meson.build b/meson.build index 1eb36a7807..c58de3e175 100644 --- a/meson.build +++ b/meson.build @@ -249,7 +249,7 @@ sources = files( ## osdep 'osdep/io.c', - 'osdep/semaphore_osx.c', + 'osdep/semaphore-mac.c', 'osdep/subprocess.c', 'osdep/timer.c', @@ -391,13 +391,13 @@ cocoa = dependency('appleframeworks', modules: ['Cocoa', 'IOKit', 'QuartzCore'], features += {'cocoa': cocoa.found()} if features['cocoa'] dependencies += cocoa - sources += files('osdep/apple_utils.c', - 'osdep/language-apple.c', - 'osdep/macosx_application.m', - 'osdep/macosx_events.m', - 'osdep/macosx_menubar.m', - 'osdep/main-fn-cocoa.c', - 'osdep/path-macosx.m') + sources += files('osdep/language-mac.c', + 'osdep/main-fn-mac.c', + 'osdep/path-mac.m', + 'osdep/utils-mac.c', + 'osdep/mac/application.m', + 'osdep/mac/events.m', + 'osdep/mac/menubar.m') endif if posix @@ -530,16 +530,16 @@ features += {'vt.h': cc.has_header_symbol('sys/vt.h', 'VT_GETMODE')} features += {'consio.h': not features['vt.h'] and cc.has_header_symbol('sys/consio.h', 'VT_GETMODE')} # macOS's pthread_setname_np is a special snowflake and differs from literally every other platform. -features += {'osx-thread-name': darwin} +features += {'mac-thread-name': darwin} features += {'glibc-thread-name': false} -if not features['osx-thread-name'] +if not features['mac-thread-name'] features += {'glibc-thread-name': posix and cc.has_function('pthread_setname_np', args: '-D_GNU_SOURCE', dependencies: pthreads, prefix: '#include ')} endif features += {'bsd-thread-name': false} -if not features['osx-thread-name'] and not features['glibc-thread-name'] +if not features['mac-thread-name'] and not features['glibc-thread-name'] features += {'bsd-thread-name': posix and cc.has_function('pthread_set_name_np', dependencies: pthreads, prefix: '#include \n#include ')} endif @@ -1513,12 +1513,12 @@ features += {'swift': swift.allowed()} swift_sources = [] if features['cocoa'] and features['swift'] - swift_sources += files('osdep/macos/libmpv_helper.swift', - 'osdep/macos/log_helper.swift', - 'osdep/macos/mpv_helper.swift', - 'osdep/macos/precise_timer.swift', - 'osdep/macos/swift_compat.swift', - 'osdep/macos/swift_extensions.swift', + swift_sources += files('osdep/mac/libmpv_helper.swift', + 'osdep/mac/log_helper.swift', + 'osdep/mac/mpv_helper.swift', + 'osdep/mac/precise_timer.swift', + 'osdep/mac/swift_compat.swift', + 'osdep/mac/swift_extensions.swift', 'video/out/mac/common.swift', 'video/out/mac/title_bar.swift', 'video/out/mac/view.swift', @@ -1546,11 +1546,11 @@ macos_media_player = get_option('macos-media-player').require( ) features += {'macos-media-player': macos_media_player.allowed()} if features['macos-media-player'] - swift_sources += files('osdep/macos/remote_command_center.swift') + swift_sources += files('osdep/mac/remote_command_center.swift') endif if features['swift'] and swift_sources.length() > 0 - subdir('osdep') + subdir('osdep/mac') endif macos_touchbar = get_option('macos-touchbar').require( @@ -1559,7 +1559,7 @@ macos_touchbar = get_option('macos-touchbar').require( ) features += {'macos-touchbar': macos_touchbar.allowed()} if features['macos-touchbar'] - sources += files('osdep/macosx_touchbar.m') + sources += files('osdep/mac/touchbar.m') endif diff --git a/options/path.c b/options/path.c index c9512a8b1f..7b212176b9 100644 --- a/options/path.c +++ b/options/path.c @@ -43,7 +43,7 @@ // In order of decreasing priority: the first has highest priority. static const mp_get_platform_path_cb path_resolvers[] = { #if HAVE_COCOA - mp_get_platform_path_osx, + mp_get_platform_path_mac, #endif #if HAVE_DARWIN mp_get_platform_path_darwin, diff --git a/osdep/language-apple.c b/osdep/language-mac.c similarity index 98% rename from osdep/language-apple.c rename to osdep/language-mac.c index dc83fb545a..32a94ae14d 100644 --- a/osdep/language-apple.c +++ b/osdep/language-mac.c @@ -19,7 +19,7 @@ #include "misc/language.h" -#include "apple_utils.h" +#include "utils-mac.h" #include "mpv_talloc.h" char **mp_get_user_langs(void) diff --git a/osdep/macosx_application.h b/osdep/mac/application.h similarity index 91% rename from osdep/macosx_application.h rename to osdep/mac/application.h index 646cbc9b8a..9d86f9e312 100644 --- a/osdep/macosx_application.h +++ b/osdep/mac/application.h @@ -15,10 +15,10 @@ * License along with mpv. If not, see . */ -#ifndef MPV_MACOSX_APPLICATION -#define MPV_MACOSX_APPLICATION +#ifndef MAC_APPLICATION +#define MAC_APPLICATION -#include "osdep/macosx_menubar.h" +#include "osdep/mac/menubar.h" #include "options/m_option.h" enum { @@ -51,4 +51,4 @@ void cocoa_register_menu_item_action(MPMenuKey key, void* action); extern const struct m_sub_options macos_conf; -#endif /* MPV_MACOSX_APPLICATION */ +#endif /* MAC_APPLICATION */ diff --git a/osdep/macosx_application.m b/osdep/mac/application.m similarity index 97% rename from osdep/macosx_application.m rename to osdep/mac/application.m index 2ef597c0fc..5938180a85 100644 --- a/osdep/macosx_application.m +++ b/osdep/mac/application.m @@ -25,16 +25,16 @@ #include "options/m_config.h" #include "options/options.h" -#import "osdep/macosx_application_objc.h" -#import "osdep/macosx_events_objc.h" +#import "osdep/mac/application_objc.h" +#import "osdep/mac/events_objc.h" #include "osdep/threads.h" #include "osdep/main-fn.h" #if HAVE_MACOS_TOUCHBAR -#import "osdep/macosx_touchbar.h" +#import "osdep/mac/touchbar.h" #endif #if HAVE_SWIFT -#include "osdep/macOS_swift.h" +#include "osdep/mac/swift.h" #endif #define MPV_PROTOCOL @"mpv://" @@ -145,15 +145,15 @@ static void terminate_cocoa_application(void) [super dealloc]; } -static const char macosx_icon[] = +static const char mac_icon[] = #include "TOOLS/osxbundle/icon.icns.inc" ; - (NSImage *)getMPVIcon { // The C string contains a trailing null, so we strip it away - NSData *icon_data = [NSData dataWithBytesNoCopy:(void *)macosx_icon - length:sizeof(macosx_icon) - 1 + NSData *icon_data = [NSData dataWithBytesNoCopy:(void *)mac_icon + length:sizeof(mac_icon) - 1 freeWhenDone:NO]; return [[NSImage alloc] initWithData:icon_data]; } diff --git a/osdep/macosx_application_objc.h b/osdep/mac/application_objc.h similarity index 94% rename from osdep/macosx_application_objc.h rename to osdep/mac/application_objc.h index da8c73268b..ad4f13ec5d 100644 --- a/osdep/macosx_application_objc.h +++ b/osdep/mac/application_objc.h @@ -16,8 +16,8 @@ */ #import -#include "osdep/macosx_application.h" -#import "osdep/macosx_menubar_objc.h" +#include "osdep/mac/application.h" +#import "osdep/mac/menubar_objc.h" @class CocoaCB; struct mpv_event; diff --git a/osdep/macosx_events.h b/osdep/mac/events.h similarity index 95% rename from osdep/macosx_events.h rename to osdep/mac/events.h index 79f2705a2e..1767b28778 100644 --- a/osdep/macosx_events.h +++ b/osdep/mac/events.h @@ -17,8 +17,8 @@ * License along with mpv. If not, see . */ -#ifndef MACOSX_EVENTS_H -#define MACOSX_EVENTS_H +#ifndef MAC_EVENTS +#define MAC_EVENTS #include "input/keycodes.h" struct input_ctx; diff --git a/osdep/macosx_events.m b/osdep/mac/events.m similarity index 99% rename from osdep/macosx_events.m rename to osdep/mac/events.m index e7f738f2b2..50d9242ca6 100644 --- a/osdep/macosx_events.m +++ b/osdep/mac/events.m @@ -33,13 +33,13 @@ // doesn't make much sense, but needed to access keymap functionality #include "video/out/vo.h" -#import "osdep/macosx_events_objc.h" -#import "osdep/macosx_application_objc.h" +#import "osdep/mac/events_objc.h" +#import "osdep/mac/application_objc.h" #include "config.h" #if HAVE_SWIFT -#include "osdep/macOS_swift.h" +#include "osdep/mac/swift.h" #endif @interface EventsResponder () diff --git a/osdep/macosx_events_objc.h b/osdep/mac/events_objc.h similarity index 97% rename from osdep/macosx_events_objc.h rename to osdep/mac/events_objc.h index 9394fe7160..263f1ed118 100644 --- a/osdep/macosx_events_objc.h +++ b/osdep/mac/events_objc.h @@ -18,7 +18,7 @@ */ #import -#include "osdep/macosx_events.h" +#include "osdep/mac/events.h" @class RemoteCommandCenter; struct input_ctx; diff --git a/osdep/macos/libmpv_helper.swift b/osdep/mac/libmpv_helper.swift similarity index 100% rename from osdep/macos/libmpv_helper.swift rename to osdep/mac/libmpv_helper.swift diff --git a/osdep/macos/log_helper.swift b/osdep/mac/log_helper.swift similarity index 100% rename from osdep/macos/log_helper.swift rename to osdep/mac/log_helper.swift diff --git a/osdep/macosx_menubar.h b/osdep/mac/menubar.h similarity index 91% rename from osdep/macosx_menubar.h rename to osdep/mac/menubar.h index 509083dd20..65e3dda34a 100644 --- a/osdep/macosx_menubar.h +++ b/osdep/mac/menubar.h @@ -15,8 +15,8 @@ * License along with mpv. If not, see . */ -#ifndef MPV_MACOSX_MENU -#define MPV_MACOSX_MENU +#ifndef MAC_MENUBAR +#define MAC_MENUBAR // Menu Keys identifying menu items typedef enum { @@ -27,4 +27,4 @@ typedef enum { MPM_ZOOM, } MPMenuKey; -#endif /* MPV_MACOSX_MENU */ +#endif /* MAC_MENUBAR */ diff --git a/osdep/macosx_menubar.m b/osdep/mac/menubar.m similarity index 99% rename from osdep/macosx_menubar.m rename to osdep/mac/menubar.m index 8aaf5aae41..6a4ea96afe 100644 --- a/osdep/macosx_menubar.m +++ b/osdep/mac/menubar.m @@ -18,8 +18,8 @@ #include "config.h" #include "common/common.h" -#import "macosx_menubar_objc.h" -#import "osdep/macosx_application_objc.h" +#import "osdep/mac/menubar_objc.h" +#import "osdep/mac/application_objc.h" @implementation MenuBar { diff --git a/osdep/macosx_menubar_objc.h b/osdep/mac/menubar_objc.h similarity index 95% rename from osdep/macosx_menubar_objc.h rename to osdep/mac/menubar_objc.h index 072fef85c7..6278916c02 100644 --- a/osdep/macosx_menubar_objc.h +++ b/osdep/mac/menubar_objc.h @@ -16,7 +16,7 @@ */ #import -#include "osdep/macosx_menubar.h" +#include "osdep/mac/menubar.h" @interface MenuBar : NSObject diff --git a/osdep/meson.build b/osdep/mac/meson.build similarity index 81% rename from osdep/meson.build rename to osdep/mac/meson.build index 21baafccdd..fca38e5282 100644 --- a/osdep/meson.build +++ b/osdep/mac/meson.build @@ -1,8 +1,8 @@ # custom swift targets -bridge = join_paths(source_root, 'osdep/macOS_swift_bridge.h') -header = join_paths(build_root, 'osdep/macOS_swift.h') -module = join_paths(build_root, 'osdep/macOS_swift.swiftmodule') -target = join_paths(build_root, 'osdep/macOS_swift.o') +bridge = join_paths(source_root, 'osdep/mac/swift_bridge.h') +header = join_paths(build_root, 'osdep/mac/swift.h') +module = join_paths(build_root, 'osdep/mac/swift.swiftmodule') +target = join_paths(build_root, 'osdep/mac/swift.o') swift_flags = ['-frontend', '-c', '-sdk', macos_sdk_path, '-enable-objc-interop', '-emit-objc-header', '-parse-as-library'] @@ -22,7 +22,7 @@ endif extra_flags = get_option('swift-flags').split() swift_flags += extra_flags -swift_compile = [swift_prog, swift_flags, '-module-name', 'macOS_swift', +swift_compile = [swift_prog, swift_flags, '-module-name', 'swift', '-emit-module-path', '@OUTPUT0@', '-import-objc-header', bridge, '-emit-objc-header-path', '@OUTPUT1@', '-o', '@OUTPUT2@', '@INPUT@', '-I.', '-I' + source_root, @@ -31,7 +31,7 @@ swift_compile = [swift_prog, swift_flags, '-module-name', 'macOS_swift', swift_targets = custom_target('swift_targets', input: swift_sources, - output: ['macOS_swift.swiftmodule', 'macOS_swift.h', 'macOS_swift.o'], + output: ['swift.swiftmodule', 'swift.h', 'swift.o'], command: swift_compile, ) sources += swift_targets diff --git a/osdep/macos/mpv_helper.swift b/osdep/mac/mpv_helper.swift similarity index 100% rename from osdep/macos/mpv_helper.swift rename to osdep/mac/mpv_helper.swift diff --git a/osdep/macos/precise_timer.swift b/osdep/mac/precise_timer.swift similarity index 100% rename from osdep/macos/precise_timer.swift rename to osdep/mac/precise_timer.swift diff --git a/osdep/macos/remote_command_center.swift b/osdep/mac/remote_command_center.swift similarity index 100% rename from osdep/macos/remote_command_center.swift rename to osdep/mac/remote_command_center.swift diff --git a/osdep/macOS_swift_bridge.h b/osdep/mac/swift_bridge.h similarity index 96% rename from osdep/macOS_swift_bridge.h rename to osdep/mac/swift_bridge.h index 72be85274a..a32d046d9e 100644 --- a/osdep/macOS_swift_bridge.h +++ b/osdep/mac/swift_bridge.h @@ -30,8 +30,8 @@ #include "input/event.h" #include "video/out/win_state.h" -#include "osdep/macosx_application_objc.h" -#include "osdep/macosx_events_objc.h" +#include "osdep/mac/application_objc.h" +#include "osdep/mac/events_objc.h" // complex macros won't get imported to Swift so we have to reassign them diff --git a/osdep/macos/swift_compat.swift b/osdep/mac/swift_compat.swift similarity index 100% rename from osdep/macos/swift_compat.swift rename to osdep/mac/swift_compat.swift diff --git a/osdep/macos/swift_extensions.swift b/osdep/mac/swift_extensions.swift similarity index 100% rename from osdep/macos/swift_extensions.swift rename to osdep/mac/swift_extensions.swift diff --git a/osdep/macosx_touchbar.h b/osdep/mac/touchbar.h similarity index 97% rename from osdep/macosx_touchbar.h rename to osdep/mac/touchbar.h index a03b68c0e6..38c4672a9b 100644 --- a/osdep/macosx_touchbar.h +++ b/osdep/mac/touchbar.h @@ -16,7 +16,7 @@ */ #import -#import "osdep/macosx_application_objc.h" +#import "osdep/mac/application_objc.h" #define BASE_ID @"io.mpv.touchbar" static NSTouchBarCustomizationIdentifier customID = BASE_ID; diff --git a/osdep/macosx_touchbar.m b/osdep/mac/touchbar.m similarity index 99% rename from osdep/macosx_touchbar.m rename to osdep/mac/touchbar.m index d70324bd1c..ce92c6cfc9 100644 --- a/osdep/macosx_touchbar.m +++ b/osdep/mac/touchbar.m @@ -16,7 +16,7 @@ */ #include "player/client.h" -#import "macosx_touchbar.h" +#import "osdep/mac/touchbar.h" @implementation TouchBar diff --git a/osdep/main-fn-cocoa.c b/osdep/main-fn-mac.c similarity index 89% rename from osdep/main-fn-cocoa.c rename to osdep/main-fn-mac.c index eeed127ead..356f767911 100644 --- a/osdep/main-fn-cocoa.c +++ b/osdep/main-fn-mac.c @@ -1,4 +1,4 @@ -#include "osdep/macosx_application.h" +#include "osdep/mac/application.h" // This is needed because Cocoa absolutely requires creating the NSApplication // singleton and running it in the "main" thread. It is apparently not diff --git a/osdep/path-macosx.m b/osdep/path-mac.m similarity index 95% rename from osdep/path-macosx.m rename to osdep/path-mac.m index 8a5a704e49..2054269e7b 100644 --- a/osdep/path-macosx.m +++ b/osdep/path-mac.m @@ -19,7 +19,7 @@ #include "options/path.h" #include "osdep/path.h" -const char *mp_get_platform_path_osx(void *talloc_ctx, const char *type) +const char *mp_get_platform_path_mac(void *talloc_ctx, const char *type) { if (strcmp(type, "osxbundle") == 0 && getenv("MPVBUNDLE")) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; diff --git a/osdep/path.h b/osdep/path.h index a9b9a3237f..c5540e4352 100644 --- a/osdep/path.h +++ b/osdep/path.h @@ -26,7 +26,7 @@ typedef const char *(*mp_get_platform_path_cb)(void *talloc_ctx, const char *typ const char *mp_get_platform_path_darwin(void *talloc_ctx, const char *type); const char *mp_get_platform_path_uwp(void *talloc_ctx, const char *type); const char *mp_get_platform_path_win(void *talloc_ctx, const char *type); -const char *mp_get_platform_path_osx(void *talloc_ctx, const char *type); +const char *mp_get_platform_path_mac(void *talloc_ctx, const char *type); const char *mp_get_platform_path_unix(void *talloc_ctx, const char *type); #endif diff --git a/osdep/semaphore_osx.c b/osdep/semaphore-mac.c similarity index 100% rename from osdep/semaphore_osx.c rename to osdep/semaphore-mac.c diff --git a/osdep/threads-posix.h b/osdep/threads-posix.h index 4cda0bebfc..b930506958 100644 --- a/osdep/threads-posix.h +++ b/osdep/threads-posix.h @@ -23,7 +23,7 @@ #include "common/common.h" #include "config.h" -// We make use of NON-POSIX pthreads functions and certain systems +// We make use of NON-POSIX pthreads functions and certain systems // require this header to build without issues. (ex: OpenBSD) #if HAVE_BSD_THREAD_NAME #include @@ -235,7 +235,7 @@ static inline void mp_thread_set_name(const char *name) } #elif HAVE_BSD_THREAD_NAME pthread_set_name_np(pthread_self(), name); -#elif HAVE_OSX_THREAD_NAME +#elif HAVE_MAC_THREAD_NAME pthread_setname_np(name); #endif } diff --git a/osdep/apple_utils.c b/osdep/utils-mac.c similarity index 97% rename from osdep/apple_utils.c rename to osdep/utils-mac.c index 02cdfaa95a..6acddfb808 100644 --- a/osdep/apple_utils.c +++ b/osdep/utils-mac.c @@ -17,7 +17,7 @@ * License along with mpv. If not, see . */ -#include "apple_utils.h" +#include "utils-mac.h" #include "mpv_talloc.h" diff --git a/osdep/apple_utils.h b/osdep/utils-mac.h similarity index 91% rename from osdep/apple_utils.h rename to osdep/utils-mac.h index 166937e1ea..b32482533d 100644 --- a/osdep/apple_utils.h +++ b/osdep/utils-mac.h @@ -17,12 +17,12 @@ * License along with mpv. If not, see . */ -#ifndef MPV_APPLE_UTILS -#define MPV_APPLE_UTILS +#ifndef UTILS_MAC +#define UTILS_MAC #include CFStringRef cfstr_from_cstr(const char *str); char *cfstr_get_cstr(const CFStringRef cfstr); -#endif /* MPV_APPLE_UTILS */ +#endif /* UTILS_MAC */ diff --git a/player/main.c b/player/main.c index 25c2ff087c..0458831f7c 100644 --- a/player/main.c +++ b/player/main.c @@ -71,7 +71,7 @@ static const char def_config[] = ; #if HAVE_COCOA -#include "osdep/macosx_events.h" +#include "osdep/mac/events.h" #endif #ifndef FULLCONFIG @@ -389,7 +389,7 @@ int mp_initialize(struct MPContext *mpctx, char **options) MP_STATS(mpctx, "start init"); #if HAVE_COCOA - mpv_handle *ctx = mp_new_client(mpctx->clients, "osx"); + mpv_handle *ctx = mp_new_client(mpctx->clients, "mac"); cocoa_set_mpv_handle(ctx); #endif diff --git a/video/out/vo_libmpv.c b/video/out/vo_libmpv.c index ea13e83e97..fafe85acda 100644 --- a/video/out/vo_libmpv.c +++ b/video/out/vo_libmpv.c @@ -28,7 +28,7 @@ #include "libmpv.h" #if HAVE_MACOS_COCOA_CB -#include "osdep/macosx_events.h" +#include "osdep/mac/events.h" #endif /* diff --git a/video/out/vulkan/context_mac.m b/video/out/vulkan/context_mac.m index 8ac6e169f6..041888a7c2 100644 --- a/video/out/vulkan/context_mac.m +++ b/video/out/vulkan/context_mac.m @@ -16,7 +16,7 @@ */ #include "video/out/gpu/context.h" -#include "osdep/macOS_swift.h" +#include "osdep/mac/swift.h" #include "common.h" #include "context.h"