From e94052ab6516e7b5756a5a6e7497116072433a14 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/core/device_memory_manager.inc | 2 +- src/input_common/CMakeLists.txt | 2 +- src/yuzu_cmd/yuzu.cpp | 17 +---------------- 5 files changed, 16 insertions(+), 27 deletions(-) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 0dd1ed60ca..fc7d3c61a8 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -276,8 +276,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/core/device_memory_manager.inc b/src/core/device_memory_manager.inc index 1a588ec34a..4be26d9631 100644 --- a/src/core/device_memory_manager.inc +++ b/src/core/device_memory_manager.inc @@ -166,7 +166,7 @@ struct DeviceMemoryManagerAllocator { template DeviceMemoryManager::DeviceMemoryManager(const DeviceMemory& device_memory_) - : physical_base{uintptr_t(device_memory_.buffer.BackingBasePointer())}, + : physical_base{reinterpret_cast(device_memory_.buffer.BackingBasePointer())}, device_inter{nullptr}, compressed_physical_ptr(device_as_size >> Memory::YUZU_PAGEBITS), compressed_device_addr(1ULL << ((Settings::values.memory_layout_mode.GetValue() == Settings::MemoryLayout::Memory_4Gb diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 7d69060d57..30ccd7e8c1 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