Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Fix some deprecation warnings. #88987

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/macos/display_server_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,7 @@
return image;
}
NSBitmapImageRep *bitmap = [NSBitmapImageRep imageRepWithData:data];
NSData *pngData = [bitmap representationUsingType:NSPNGFileType properties:@{}];
NSData *pngData = [bitmap representationUsingType:NSBitmapImageFileTypePNG properties:@{}];
image.instantiate();
PNGDriverCommon::png_to_image((const uint8_t *)pngData.bytes, pngData.length, false, image);
return image;
Expand Down
2 changes: 1 addition & 1 deletion platform/macos/godot_application.mm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ - (void)mediaKeyEvent:(int)key state:(BOOL)state repeat:(BOOL)repeat {
}

- (void)sendEvent:(NSEvent *)event {
if ([event type] == NSSystemDefined && [event subtype] == 8) {
if ([event type] == NSEventTypeSystemDefined && [event subtype] == 8) {
int keyCode = (([event data1] & 0xFFFF0000) >> 16);
int keyFlags = ([event data1] & 0x0000FFFF);
int keyState = (((keyFlags & 0xFF00) >> 8)) == 0xA;
Expand Down
4 changes: 4 additions & 0 deletions platform/macos/os_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,9 @@
for (const String &arg : p_arguments) {
[arguments addObject:[NSString stringWithUTF8String:arg.utf8().get_data()]];
}
#if defined(__x86_64__)
if (@available(macOS 10.15, *)) {
#endif
NSWorkspaceOpenConfiguration *configuration = [[NSWorkspaceOpenConfiguration alloc] init];
[configuration setArguments:arguments];
[configuration setCreatesNewApplicationInstance:YES];
Expand Down Expand Up @@ -630,6 +632,7 @@
}

return err;
#if defined(__x86_64__)
} else {
Error err = ERR_TIMEOUT;
NSError *error = nullptr;
Expand All @@ -645,6 +648,7 @@
}
return err;
}
#endif
} else {
return OS_Unix::create_process(p_path, p_arguments, r_child_id, p_open_console);
}
Expand Down
Loading