mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
build: Add support for x86 macOS 10.15 and ARM64 macOS 11.0 (#2607)
This PR drops the use of brew for dependency management in favor of macports so we can support lower macOS versions instead of just the lowest one supported by Apple Closes #2586
This commit is contained in:
@@ -424,9 +424,15 @@
|
||||
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
|
||||
willPresentNotification:(UNNotification *)notification
|
||||
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler {
|
||||
completionHandler(UNNotificationPresentationOptionBanner |
|
||||
UNNotificationPresentationOptionSound |
|
||||
UNNotificationPresentationOptionList);
|
||||
if (@available(macOS 11.0, *)) {
|
||||
completionHandler(UNNotificationPresentationOptionBanner |
|
||||
UNNotificationPresentationOptionSound |
|
||||
UNNotificationPresentationOptionList);
|
||||
} else {
|
||||
// For macOS 10.15 and earlier
|
||||
completionHandler(UNNotificationPresentationOptionAlert |
|
||||
UNNotificationPresentationOptionSound);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -1201,7 +1201,8 @@ static EM_BOOL ImGui_ImplGlfw_OnCanvasSizeChange(int event_type, const Emscripte
|
||||
ImGui_ImplGlfw_Data* bd = (ImGui_ImplGlfw_Data*)user_data;
|
||||
double canvas_width, canvas_height;
|
||||
emscripten_get_element_css_size(bd->CanvasSelector, &canvas_width, &canvas_height);
|
||||
glfwSetWindowSize(bd->Window, (int)canvas_width, (int)canvas_height);
|
||||
double scale = emscripten_get_device_pixel_ratio();
|
||||
glfwSetWindowSize(bd->Window, (int)canvas_width * scale, (int)canvas_height * scale);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1210,7 +1211,8 @@ static EM_BOOL ImGui_ImplEmscripten_FullscreenChangeCallback(int event_type, con
|
||||
ImGui_ImplGlfw_Data* bd = (ImGui_ImplGlfw_Data*)user_data;
|
||||
double canvas_width, canvas_height;
|
||||
emscripten_get_element_css_size(bd->CanvasSelector, &canvas_width, &canvas_height);
|
||||
glfwSetWindowSize(bd->Window, (int)canvas_width, (int)canvas_height);
|
||||
double scale = emscripten_get_device_pixel_ratio();
|
||||
glfwSetWindowSize(bd->Window, (int)canvas_width * scale, (int)canvas_height * scale);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user