From 33d140fa7b6d031d27470f80e90914d444d2050a Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 28 Jan 2026 19:51:50 +0000 Subject: [PATCH] fixup shit --- externals/CMakeLists.txt | 6 ++++-- src/core/device_memory.h | 16 +++++++++------- src/input_common/CMakeLists.txt | 2 +- src/yuzu_cmd/yuzu.cpp | 17 +---------------- 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 1c73f4671f..c324e35f73 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -263,8 +263,10 @@ target_include_directories(tz PUBLIC ./tz) add_library(bc_decoder bc_decoder/bc_decoder.cpp) target_include_directories(bc_decoder PUBLIC ./bc_decoder) -add_library(ps4sup ps4sup/emutls.c ps4sup/stub.cpp) -target_include_directories(ps4sup PUBLIC ./ps4sup) +if (PLATFORM_PS4) + add_library(ps4sup ps4sup/emutls.c ps4sup/stub.cpp) + target_include_directories(ps4sup PUBLIC ./ps4sup) +endif() if (NOT TARGET RenderDoc::API) add_library(renderdoc INTERFACE) diff --git a/src/core/device_memory.h b/src/core/device_memory.h index 29d2ff7a2b..11bf0e3268 100644 --- a/src/core/device_memory.h +++ b/src/core/device_memory.h @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project -// SPDX-License-Identifier: GPL-3.0-or-later - // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -29,22 +26,27 @@ public: template Common::PhysicalAddress GetPhysicalAddr(const T* ptr) const { - return (uintptr_t(ptr) - uintptr_t(buffer.BackingBasePointer())) + DramMemoryMap::Base; + return (reinterpret_cast(ptr) - + reinterpret_cast(buffer.BackingBasePointer())) + + DramMemoryMap::Base; } template PAddr GetRawPhysicalAddr(const T* ptr) const { - return PAddr(uintptr_t(ptr) - uintptr_t(buffer.BackingBasePointer())); + return static_cast(reinterpret_cast(ptr) - + reinterpret_cast(buffer.BackingBasePointer())); } template T* GetPointer(Common::PhysicalAddress addr) { - return reinterpret_cast(buffer.BackingBasePointer() + (GetInteger(addr) - DramMemoryMap::Base)); + return reinterpret_cast(buffer.BackingBasePointer() + + (GetInteger(addr) - DramMemoryMap::Base)); } template const T* GetPointer(Common::PhysicalAddress addr) const { - return reinterpret_cast(buffer.BackingBasePointer() + (GetInteger(addr) - DramMemoryMap::Base)); + return reinterpret_cast(buffer.BackingBasePointer() + + (GetInteger(addr) - DramMemoryMap::Base)); } template diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index ef1308b1d0..c7c4b11800 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -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 # SPDX-FileCopyrightText: 2018 yuzu Emulator Project diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index baba1c1d0a..368123d941 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -51,22 +51,7 @@ #include #endif -#ifdef __OPENORBIS__ -#include -#include -#include <__thread/support.h> -# define STUB_WEAK(name) extern "C" void name() { printf("called " #name); asm volatile("ud2"); } -extern "C" void __cxa_thread_atexit_impl() { - //printf("atexit called"); -} -STUB_WEAK(__assert) -STUB_WEAK(ZSTD_trace_compress_begin) -STUB_WEAK(ZSTD_trace_compress_end) -STUB_WEAK(ZSTD_trace_decompress_begin) -STUB_WEAK(ZSTD_trace_decompress_end) -FILE* __stderrp = stdout; -# undef STUB_WEAK -#elif defined(_WIN32) +#if defined(_WIN32) extern "C" { // tells Nvidia and AMD drivers to use the dedicated GPU by default on laptops with switchable // graphics