mirror of
https://github.com/patchzyy/wiicompiled
synced 2026-10-20 13:36:47 -04:00
Macos support into main (#228)
* macos: add x86_64 Intel support * (feat) Apple Silicon macOS CI building and Setup.pkg documentation (#118) * docs(macos): document Setup.pkg installation Add Apple Silicon macOS CI coverage for runtime configuration, substrate tests, and Setup.pkg packaging alongside the macOS installation instructions. * macos: pin Apple Silicon deployment target * fix(macos): restore Retro Rewind local builds * macos: package universal setup tools * ci: build macOS input expression tests * runtime: Do not force 14.0 minimum anymore new minimum is 12.0 * macos: support older libc++ algorithms * macos: allow undefined MTLLogStateDescriptor for older SDKs * tests: deflake input expression timing window test * build: Fix mac tests * translator: emit null statement after continuation labels for C++17 compatibility * feat(macos): add MetalFX spatial upscaling * Fix automatic music muting on macOS Co-Authored-By: Michael G <10155689+DarthMDev@users.noreply.github.com> Co-Authored-By: Daan Vervacke <23398694+DaanVervacke@users.noreply.github.com> * Address CodeRabbit review comments and integrate upstream TLS cmake * Remove version requirement for running package CI Co-Authored-By: Michael G <10155689+DarthMDev@users.noreply.github.com> * publish-app: fix dependency discovery from build dir, handle spaces in paths, and fail on missing deps * publish-app: preserve subdirectory suffix during @rpath dependency lookup * cmake: synchronize CMAKE_SYSTEM_PROCESSOR with CMAKE_OSX_ARCHITECTURES on macOS * fix rpaths --------- Co-authored-by: DarthM <mgracer48@yahoo.com> Co-authored-by: Michael G <10155689+DarthMDev@users.noreply.github.com> Co-authored-by: Daan Vervacke <23398694+DaanVervacke@users.noreply.github.com> Co-authored-by: patchzyy <64382339+patchzyy@users.noreply.github.com>
This commit is contained in:
@@ -111,6 +111,9 @@ bool g_skipUnreadyPipelines = RuntimeConfigFile::SkipUnreadyPipelines(true);
|
||||
bool g_disableCopyFilter = RuntimeConfigFile::DisableCopyFilter(true);
|
||||
bool g_showFps = RuntimeConfigFile::ShowFps(true);
|
||||
bool g_forceAspect169 = RuntimeConfigFile::ForceAspect169Enabled();
|
||||
#if defined(__APPLE__)
|
||||
bool g_metalFxSpatialUpscaling = RuntimeConfigFile::MetalFxSpatialUpscaling(false);
|
||||
#endif
|
||||
uint32_t g_disabledPostProcessingPaths = RuntimeConfigFile::DisabledPostProcessingPaths(0);
|
||||
std::array<int32_t, PAD_MAX_CONTROLLERS> g_configuredControllerIndices = [] {
|
||||
std::array<int32_t, PAD_MAX_CONTROLLERS> indices{};
|
||||
@@ -998,13 +1001,24 @@ void DrawAudioSettings() {
|
||||
MusicAttenuation::SetEnabled(g_attenuateMusicWhenMediaPlays);
|
||||
RuntimeConfigFile::SetAttenuateMusicWhenMediaPlays(g_attenuateMusicWhenMediaPlays);
|
||||
}
|
||||
#if defined(__APPLE__)
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(
|
||||
"Detects other apps with active audio output on macOS 14.2 or later. "
|
||||
"Apps that keep an output stream running silently may keep game music muted.");
|
||||
}
|
||||
#endif
|
||||
if (g_attenuateMusicWhenMediaPlays) {
|
||||
if (MusicAttenuation::IsExternalMediaPlaying()) {
|
||||
ImGui::TextDisabled("External media is playing; game music is muted.");
|
||||
} else if (!MusicAttenuation::IsMediaControlInitializationComplete()) {
|
||||
ImGui::TextDisabled("Waiting for media controls...");
|
||||
ImGui::TextDisabled("Checking external audio...");
|
||||
} else if (!MusicAttenuation::IsMediaControlAvailable()) {
|
||||
#if defined(__APPLE__)
|
||||
ImGui::TextDisabled("External audio detection unavailable (requires macOS 14.2 or later).");
|
||||
#else
|
||||
ImGui::TextDisabled("Media controls are unavailable.");
|
||||
#endif
|
||||
} else {
|
||||
ImGui::TextDisabled("No external media is currently playing.");
|
||||
}
|
||||
@@ -1093,6 +1107,36 @@ void DrawGraphicsSettings() {
|
||||
ImGui::PushTextWrapPos(ImGui::GetCursorPosX() + 380.0f);
|
||||
ImGui::TextDisabled("Frame interpolation is experimental, you might find visual artifacts");
|
||||
ImGui::PopTextWrapPos();
|
||||
#if defined(__APPLE__)
|
||||
const bool metalFxSupported = aurora_is_metalfx_spatial_supported();
|
||||
ImGui::BeginDisabled(!metalFxSupported);
|
||||
if (ImGui::Checkbox("MetalFX spatial upscaling", &g_metalFxSpatialUpscaling)) {
|
||||
aurora_set_metalfx_spatial(g_metalFxSpatialUpscaling);
|
||||
RuntimeConfigFile::SetMetalFxSpatialUpscaling(g_metalFxSpatialUpscaling);
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
switch (aurora_get_metalfx_status()) {
|
||||
case AURORA_METALFX_ACTIVE:
|
||||
ImGui::TextDisabled("Active: upscaling the game image before the overlay.");
|
||||
break;
|
||||
case AURORA_METALFX_NOT_UPSCALING:
|
||||
ImGui::TextDisabled("Choose a lower internal resolution to use MetalFX.");
|
||||
break;
|
||||
case AURORA_METALFX_UNSUPPORTED:
|
||||
ImGui::TextDisabled("Requires macOS 13+, Metal, and a MetalFX-capable GPU.");
|
||||
break;
|
||||
case AURORA_METALFX_ERROR:
|
||||
ImGui::TextDisabled("Unavailable after a renderer error; toggle off and on to retry.");
|
||||
break;
|
||||
case AURORA_METALFX_DISABLED:
|
||||
if (metalFxSupported) {
|
||||
ImGui::TextDisabled("Render below output resolution for sharper lower-cost output.");
|
||||
} else {
|
||||
ImGui::TextDisabled("MetalFX spatial upscaling is unavailable on this device.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (ImGui::Checkbox("Disable copy filter", &g_disableCopyFilter)) {
|
||||
aurora_set_disable_copy_filter(g_disableCopyFilter);
|
||||
RuntimeConfigFile::SetDisableCopyFilter(g_disableCopyFilter);
|
||||
@@ -1397,6 +1441,9 @@ void InitializeRuntimeSettings() noexcept {
|
||||
MusicAttenuation::SetVoicesVolume(static_cast<float>(g_voicesVolumePercent) / 100.0f);
|
||||
MusicAttenuation::SetEnabled(g_attenuateMusicWhenMediaPlays);
|
||||
RuntimeGameGraphicsOptions::SetDisabledPostProcessingPaths(g_disabledPostProcessingPaths);
|
||||
#if defined(__APPLE__)
|
||||
aurora_set_metalfx_spatial(g_metalFxSpatialUpscaling);
|
||||
#endif
|
||||
const uint32_t targetFps = kFrameInterpolationTargetFps[static_cast<size_t>(g_frameInterpolationMode)];
|
||||
LimitResolutionForFrameRate();
|
||||
aurora_set_frame_interpolation_fps(targetFps);
|
||||
|
||||
Reference in New Issue
Block a user