summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-02-27 16:55:29 +0100
committerder richter <der.richter@gmx.de>2024-02-28 15:52:47 +0100
commit86fa9b18a3619a379a597ca0902c23dc053cafc0 (patch)
treef187f85a97744bd0468290975e5ec4d10054b25b
parent661f45377a17635125ae36f0b8a3487ae13cf606 (diff)
downloadmpv-86fa9b18a3619a379a597ca0902c23dc053cafc0.tar.bz2
mpv-86fa9b18a3619a379a597ca0902c23dc053cafc0.tar.xz
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.
-rw-r--r--audio/out/ao_coreaudio_utils.h2
-rw-r--r--input/input.c2
-rw-r--r--meson.build40
-rw-r--r--options/path.c2
-rw-r--r--osdep/language-mac.c (renamed from osdep/language-apple.c)2
-rw-r--r--osdep/mac/application.h (renamed from osdep/macosx_application.h)8
-rw-r--r--osdep/mac/application.m (renamed from osdep/macosx_application.m)14
-rw-r--r--osdep/mac/application_objc.h (renamed from osdep/macosx_application_objc.h)4
-rw-r--r--osdep/mac/events.h (renamed from osdep/macosx_events.h)4
-rw-r--r--osdep/mac/events.m (renamed from osdep/macosx_events.m)6
-rw-r--r--osdep/mac/events_objc.h (renamed from osdep/macosx_events_objc.h)2
-rw-r--r--osdep/mac/libmpv_helper.swift (renamed from osdep/macos/libmpv_helper.swift)0
-rw-r--r--osdep/mac/log_helper.swift (renamed from osdep/macos/log_helper.swift)0
-rw-r--r--osdep/mac/menubar.h (renamed from osdep/macosx_menubar.h)6
-rw-r--r--osdep/mac/menubar.m (renamed from osdep/macosx_menubar.m)4
-rw-r--r--osdep/mac/menubar_objc.h (renamed from osdep/macosx_menubar_objc.h)2
-rw-r--r--osdep/mac/meson.build (renamed from osdep/meson.build)12
-rw-r--r--osdep/mac/mpv_helper.swift (renamed from osdep/macos/mpv_helper.swift)0
-rw-r--r--osdep/mac/precise_timer.swift (renamed from osdep/macos/precise_timer.swift)0
-rw-r--r--osdep/mac/remote_command_center.swift (renamed from osdep/macos/remote_command_center.swift)0
-rw-r--r--osdep/mac/swift_bridge.h (renamed from osdep/macOS_swift_bridge.h)4
-rw-r--r--osdep/mac/swift_compat.swift (renamed from osdep/macos/swift_compat.swift)0
-rw-r--r--osdep/mac/swift_extensions.swift (renamed from osdep/macos/swift_extensions.swift)0
-rw-r--r--osdep/mac/touchbar.h (renamed from osdep/macosx_touchbar.h)2
-rw-r--r--osdep/mac/touchbar.m (renamed from osdep/macosx_touchbar.m)2
-rw-r--r--osdep/main-fn-mac.c (renamed from osdep/main-fn-cocoa.c)2
-rw-r--r--osdep/path-mac.m (renamed from osdep/path-macosx.m)2
-rw-r--r--osdep/path.h2
-rw-r--r--osdep/semaphore-mac.c (renamed from osdep/semaphore_osx.c)0
-rw-r--r--osdep/threads-posix.h4
-rw-r--r--osdep/utils-mac.c (renamed from osdep/apple_utils.c)2
-rw-r--r--osdep/utils-mac.h (renamed from osdep/apple_utils.h)6
-rw-r--r--player/main.c4
-rw-r--r--video/out/vo_libmpv.c2
-rw-r--r--video/out/vulkan/context_mac.m2
35 files changed, 72 insertions, 72 deletions
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 <pthread.h>')}
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 <pthread.h>\n#include <pthread_np.h>')}
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
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
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 <http://www.gnu.org/licenses/>.
*/
-#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
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
index da8c73268b..ad4f13ec5d 100644
--- a/osdep/macosx_application_objc.h
+++ b/osdep/mac/application_objc.h
@@ -16,8 +16,8 @@
*/
#import <Cocoa/Cocoa.h>
-#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
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 <http://www.gnu.org/licenses/>.
*/
-#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
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
index 9394fe7160..263f1ed118 100644
--- a/osdep/macosx_events_objc.h
+++ b/osdep/mac/events_objc.h
@@ -18,7 +18,7 @@
*/
#import <Cocoa/Cocoa.h>
-#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
index 4bead84c69..4bead84c69 100644
--- a/osdep/macos/libmpv_helper.swift
+++ b/osdep/mac/libmpv_helper.swift
diff --git a/osdep/macos/log_helper.swift b/osdep/mac/log_helper.swift
index 94640756bd..94640756bd 100644
--- a/osdep/macos/log_helper.swift
+++ b/osdep/mac/log_helper.swift
diff --git a/osdep/macosx_menubar.h b/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 <http://www.gnu.org/licenses/>.
*/
-#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
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
index 072fef85c7..6278916c02 100644
--- a/osdep/macosx_menubar_objc.h
+++ b/osdep/mac/menubar_objc.h
@@ -16,7 +16,7 @@
*/
#import <Cocoa/Cocoa.h>
-#include "osdep/macosx_menubar.h"
+#include "osdep/mac/menubar.h"
@interface MenuBar : NSObject
diff --git a/osdep/meson.build b/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
index 53ef4cb521..53ef4cb521 100644
--- a/osdep/macos/mpv_helper.swift
+++ b/osdep/mac/mpv_helper.swift
diff --git a/osdep/macos/precise_timer.swift b/osdep/mac/precise_timer.swift
index f4ad3bb6b6..f4ad3bb6b6 100644
--- a/osdep/macos/precise_timer.swift
+++ b/osdep/mac/precise_timer.swift
diff --git a/osdep/macos/remote_command_center.swift b/osdep/mac/remote_command_center.swift
index f6613a1f9a..f6613a1f9a 100644
--- a/osdep/macos/remote_command_center.swift
+++ b/osdep/mac/remote_command_center.swift
diff --git a/osdep/macOS_swift_bridge.h b/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
index 83059dae5c..83059dae5c 100644
--- a/osdep/macos/swift_compat.swift
+++ b/osdep/mac/swift_compat.swift
diff --git a/osdep/macos/swift_extensions.swift b/osdep/mac/swift_extensions.swift
index c0a7cd95e4..c0a7cd95e4 100644
--- a/osdep/macos/swift_extensions.swift
+++ b/osdep/mac/swift_extensions.swift
diff --git a/osdep/macosx_touchbar.h b/osdep/mac/touchbar.h
index a03b68c0e6..38c4672a9b 100644
--- a/osdep/macosx_touchbar.h
+++ b/osdep/mac/touchbar.h
@@ -16,7 +16,7 @@
*/
#import <Cocoa/Cocoa.h>
-#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
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
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
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
index bfb4d571f0..bfb4d571f0 100644
--- a/osdep/semaphore_osx.c
+++ b/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 <pthread_np.h>
@@ -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
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 <http://www.gnu.org/licenses/>.
*/
-#include "apple_utils.h"
+#include "utils-mac.h"
#include "mpv_talloc.h"
diff --git a/osdep/apple_utils.h b/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 <http://www.gnu.org/licenses/>.
*/
-#ifndef MPV_APPLE_UTILS
-#define MPV_APPLE_UTILS
+#ifndef UTILS_MAC
+#define UTILS_MAC
#include <CoreFoundation/CoreFoundation.h>
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"