[Scummvm-git-logs] scummvm master -> 95c65cd30a42a626392fc93d6d3a7e1a81d42fcb
lephilousophe
noreply at scummvm.org
Sat Dec 28 10:45:54 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f67f7f6354 BACKENDS: MACOS: Don't instantiate touch bar on old MacOS versions
95c65cd30a BACKENDS: MACOS: Cleanup nullptr use in ObjC files
Commit: f67f7f6354a78f714cb504bbb4fc6faa60c66e73
https://github.com/scummvm/scummvm/commit/f67f7f6354a78f714cb504bbb4fc6faa60c66e73
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-12-28T11:45:49+01:00
Commit Message:
BACKENDS: MACOS: Don't instantiate touch bar on old MacOS versions
They do not support it and it fails on invalidateIntrinsicContentSize
As the touch bar was introduced in 10.12.2, check the SDK version
against this define instead on 10.12.
Changed paths:
backends/platform/sdl/macosx/macosx-touchbar.mm
diff --git a/backends/platform/sdl/macosx/macosx-touchbar.mm b/backends/platform/sdl/macosx/macosx-touchbar.mm
index c62909e6206..f5fbfc574ac 100644
--- a/backends/platform/sdl/macosx/macosx-touchbar.mm
+++ b/backends/platform/sdl/macosx/macosx-touchbar.mm
@@ -32,7 +32,7 @@
#include <Cocoa/Cocoa.h>
#include <AppKit/NSWorkspace.h>
-#if defined(MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
+#if defined(MAC_OS_X_VERSION_10_12_2) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12_2
@interface ScummVMlTouchbarDelegate : NSResponder <NSTouchBarDelegate>
@end
@@ -108,6 +108,9 @@ void macOSTouchbarCreate() {
if (g_tb_delegate)
return;
+ if (NSAppKitVersionNumber < NSAppKitVersionNumber10_12_2)
+ return;
+
NSApplication *app = [NSApplication sharedApplication];
if (!app)
return;
Commit: 95c65cd30a42a626392fc93d6d3a7e1a81d42fcb
https://github.com/scummvm/scummvm/commit/95c65cd30a42a626392fc93d6d3a7e1a81d42fcb
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-12-28T11:45:49+01:00
Commit Message:
BACKENDS: MACOS: Cleanup nullptr use in ObjC files
Changed paths:
backends/platform/sdl/macosx/macosx-touchbar.mm
diff --git a/backends/platform/sdl/macosx/macosx-touchbar.mm b/backends/platform/sdl/macosx/macosx-touchbar.mm
index f5fbfc574ac..b1136641e6f 100644
--- a/backends/platform/sdl/macosx/macosx-touchbar.mm
+++ b/backends/platform/sdl/macosx/macosx-touchbar.mm
@@ -52,7 +52,7 @@ NSButton *tbButton;
[tbButton setAction:@selector(actionKey:)];
[tbButton setTarget:self];
- [self setButton:nullptr];
+ [self setButton:nil];
}
return self;
}
@@ -76,7 +76,7 @@ NSButton *tbButton;
}
- (void)setButton : (const char *)title {
- NSString *ns_title = nullptr;
+ NSString *ns_title = nil;
if (title) {
ns_title = [NSString stringWithUTF8String:title];
} else {
@@ -98,7 +98,7 @@ NSButton *tbButton;
@end
-static ScummVMlTouchbarDelegate *g_tb_delegate = nullptr;
+static ScummVMlTouchbarDelegate *g_tb_delegate = nil;
void macOSTouchbarUpdate(const char *message) {
[g_tb_delegate setButton:message];
More information about the Scummvm-git-logs
mailing list