From 709fcb9e6c2f71d396e26ccfc7159abae171971a Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 9 Feb 2026 11:02:07 +0000 Subject: [PATCH] fixup --- CMakeLists.txt | 20 ++++---- CMakeModules/CPMUtil.cmake | 5 +- src/core/arm/nce/lru_cache.h | 3 +- src/core/arm/nce/patcher.cpp | 3 +- .../backend/exception_handler_posix.cpp | 14 ++---- src/dynarmic/src/dynarmic/common/context.h | 3 +- src/yuzu/Info.plist | 2 +- tools/update-icons.sh | 46 +++++++++++++++++-- 8 files changed, 65 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 672d3b9ea4..dbe947c1bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,8 +193,6 @@ cmake_dependent_option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MS option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) -# See https://github.com/llvm/llvm-project/issues/123946 -# OpenBSD va_list doesn't play nice with precompiled headers set(EXT_DEFAULT OFF) if (MSVC OR ANDROID) set(EXT_DEFAULT ON) @@ -313,7 +311,6 @@ if (YUZU_LEGACY) add_compile_definitions(YUZU_LEGACY) endif() -# TODO: APPLE if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX)) set(HAS_NCE 1) add_compile_definitions(HAS_NCE=1) @@ -466,15 +463,16 @@ if (YUZU_USE_CPM) add_library(zstd::libzstd ALIAS libzstd_static) endif() - # Opus - AddJsonPackage(opus) - if (Opus_ADDED) - if (MSVC AND CXX_CLANG) - target_compile_options(opus PRIVATE - -Wno-implicit-function-declaration - ) + if (NOT YUZU_STATIC_ROOM) + # nlohmann + AddJsonPackage(nlohmann) + + # zlib + AddJsonPackage(zlib) + + if (ZLIB_ADDED) + add_library(ZLIB::ZLIB ALIAS zlibstatic) endif() - endif() # Opus AddJsonPackage(opus) diff --git a/CMakeModules/CPMUtil.cmake b/CMakeModules/CPMUtil.cmake index 747d69a1fe..4c9b645d16 100644 --- a/CMakeModules/CPMUtil.cmake +++ b/CMakeModules/CPMUtil.cmake @@ -1,9 +1,9 @@ # SPDX-FileCopyrightText: Copyright 2026 crueter # SPDX-License-Identifier: LGPL-3.0-or-later -cmake_minimum_required(VERSION 3.22) +set(CPM_SOURCE_CACHE "${PROJECT_SOURCE_DIR}/.cache/cpm" CACHE STRING "" FORCE) -if (MSVC OR ANDROID) +if(MSVC OR ANDROID) set(BUNDLED_DEFAULT ON) else() set(BUNDLED_DEFAULT OFF) @@ -15,6 +15,7 @@ option(CPMUTIL_FORCE_BUNDLED option(CPMUTIL_FORCE_SYSTEM "Force system packages for all CPM dependencies (NOT RECOMMENDED)" OFF) +cmake_minimum_required(VERSION 3.22) include(CPM) # cpmfile parsing diff --git a/src/core/arm/nce/lru_cache.h b/src/core/arm/nce/lru_cache.h index 7d384ec034..1bc00c8f14 100644 --- a/src/core/arm/nce/lru_cache.h +++ b/src/core/arm/nce/lru_cache.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once @@ -7,7 +7,6 @@ #include #include #include -#include #include "common/logging/log.h" diff --git a/src/core/arm/nce/patcher.cpp b/src/core/arm/nce/patcher.cpp index 7ad119df02..3a620bff12 100644 --- a/src/core/arm/nce/patcher.cpp +++ b/src/core/arm/nce/patcher.cpp @@ -5,14 +5,15 @@ #include #include "common/arm64/native_clock.h" #include "common/literals.h" +#include "core/arm/nce/arm_nce.h" #include "core/arm/nce/guest_context.h" #include "core/arm/nce/instructions.h" #include "core/arm/nce/patcher.h" #include "core/core.h" #include "core/core_timing.h" #include "core/hle/kernel/svc.h" -#include "core/hle/kernel/k_thread.h" #include "core/memory.h" +#include "core/hle/kernel/k_thread.h" namespace Core::NCE { diff --git a/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp b/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp index a811cd5bcb..9f508f72e5 100644 --- a/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp +++ b/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later /* This file is part of the dynarmic project. @@ -6,8 +6,6 @@ * SPDX-License-Identifier: 0BSD */ -#include "dynarmic/backend/exception_handler.h" - #include #include #include @@ -121,9 +119,8 @@ void SigHandler::SigAction(int sig, siginfo_t* info, void* raw_context) { CTX_DECLARE(raw_context); #if defined(ARCHITECTURE_x86_64) { - std::shared_lock guard(sig_handler->code_block_infos_mutex); - const auto iter = sig_handler->FindCodeBlockInfo(CTX_RIP); - if (iter != sig_handler->code_block_infos.end()) { + std::shared_lock guard(sig_handler->code_block_infos_mutex); + if (auto const iter = sig_handler->FindCodeBlockInfo(CTX_RIP); iter != sig_handler->code_block_infos.end()) { FakeCall fc = iter->second.cb(CTX_RIP); CTX_RSP -= sizeof(u64); *std::bit_cast(CTX_RSP) = fc.ret_rip; @@ -134,9 +131,8 @@ void SigHandler::SigAction(int sig, siginfo_t* info, void* raw_context) { fmt::print(stderr, "Unhandled {} at rip {:#018x}\n", sig == SIGSEGV ? "SIGSEGV" : "SIGBUS", CTX_RIP); #elif defined(ARCHITECTURE_arm64) { - std::shared_lock guard(sig_handler->code_block_infos_mutex); - const auto iter = sig_handler->FindCodeBlockInfo(CTX_PC); - if (iter != sig_handler->code_block_infos.end()) { + std::shared_lock guard(sig_handler->code_block_infos_mutex); + if (const auto iter = sig_handler->FindCodeBlockInfo(CTX_PC); iter != sig_handler->code_block_infos.end()) { FakeCall fc = iter->second.cb(CTX_PC); CTX_PC = fc.call_pc; return; diff --git a/src/dynarmic/src/dynarmic/common/context.h b/src/dynarmic/src/dynarmic/common/context.h index d0d9f6c1b8..941289cb94 100644 --- a/src/dynarmic/src/dynarmic/common/context.h +++ b/src/dynarmic/src/dynarmic/common/context.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once @@ -122,7 +122,6 @@ # error "unimplemented" #endif -// TODO: FreeBSD/OpenBSD #ifdef ARCHITECTURE_arm64 #ifdef __APPLE__ inline _STRUCT_ARM_NEON_STATE64* GetFloatingPointState(mcontext_t& host_ctx) { diff --git a/src/yuzu/Info.plist b/src/yuzu/Info.plist index a27a54deb8..fa44859580 100644 --- a/src/yuzu/Info.plist +++ b/src/yuzu/Info.plist @@ -21,7 +21,7 @@ SPDX-License-Identifier: GPL-2.0-or-later CFBundleIconName eden_liquidglass CFBundleIdentifier - com.eden-emu.eden + com.yuzu-emu.yuzu CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString diff --git a/tools/update-icons.sh b/tools/update-icons.sh index 8fd56ee0ca..1fcadbdf9f 100755 --- a/tools/update-icons.sh +++ b/tools/update-icons.sh @@ -1,6 +1,6 @@ #!/bin/sh -ex -# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project # SPDX-License-Identifier: GPL-3.0-or-later # Updates main icons for eden @@ -32,5 +32,45 @@ magick -size 256x256 -background transparent "$EDEN_NAMED_SVG" -resize 256x256 d optipng -o7 dist/qt_themes/default/icons/256x256/eden.png optipng -o7 dist/qt_themes/default/icons/256x256/eden_named.png -png2icns dist/eden.icns $TMP_PNG || echo 'non fatal' -rm $TMP_PNG +# Android adaptive icon (API 26+) + +EDEN_ANDROID_RES="src/android/app/src/main/res" +EDEN_ANDROID_FG="$EDEN_ANDROID_RES/drawable/ic_launcher_foreground.png" +EDEN_ANDROID_BG_COLOR=$(cat $EDEN_BG_COLOR) + +# Update Icon Background Color +echo "${EDEN_ANDROID_BG_COLOR}" > "$EDEN_ANDROID_RES/values/colors.xml" + +magick -size 1080x1080 -background transparent "$EDEN_BASE_SVG" -gravity center -resize 660x660 -extent 1080x1080 "$EDEN_ANDROID_FG" || exit +magick -background transparent "$EDEN_BASE_SVG" -gravity center -resize 512x512 "$EDEN_ANDROID_RES/drawable/ic_yuzu.png" || exit +magick -size 512x512 -background transparent "$EDEN_BASE_SVG" -gravity center -resize 338x338 -extent 512x512 "$EDEN_ANDROID_RES/drawable/ic_yuzu_splash.png" || exit +magick -background transparent "$EDEN_NAMED_SVG" -gravity center -resize 512x512 "$EDEN_ANDROID_RES/drawable/ic_yuzu_named.png" || exit + +optipng -o7 "$EDEN_ANDROID_FG" +optipng -o7 "$EDEN_ANDROID_RES/drawable/ic_yuzu.png" +optipng -o7 "$EDEN_ANDROID_RES/drawable/ic_yuzu_splash.png" +optipng -o7 "$EDEN_ANDROID_RES/drawable/ic_yuzu_named.png" + +# Android legacy launcher icon (API <= 24) + +BASE_LEGACY="$EDEN_ANDROID_RES/mipmap-xxxhdpi/ic_launcher.png" + +magick -size 512x512 xc:${EDEN_ANDROID_BG_COLOR} "$EDEN_ANDROID_FG" -gravity center -resize 384x384 -composite "$BASE_LEGACY" || exit + +magick "$BASE_LEGACY" -resize 192x192 "$EDEN_ANDROID_RES/mipmap-xxhdpi/ic_launcher.png" +magick "$BASE_LEGACY" -resize 144x144 "$EDEN_ANDROID_RES/mipmap-xhdpi/ic_launcher.png" +magick "$BASE_LEGACY" -resize 96x96 "$EDEN_ANDROID_RES/mipmap-hdpi/ic_launcher.png" +magick "$BASE_LEGACY" -resize 72x72 "$EDEN_ANDROID_RES/mipmap-mdpi/ic_launcher.png" + +optipng -o7 "$EDEN_ANDROID_RES"/mipmap-*/ic_launcher.png + +# macOS +# TODO: Update Assets.car too + +TMP_PNG="dist/eden-tmp.png" + +magick -size 1024x1024 -background none "$EDEN_BASE_SVG" "$TMP_PNG" || exit + +png2icns dist/eden.icns "$TMP_PNG" || echo 'non fatal' + +rm "$TMP_PNG"