diff --git a/CMakeLists.txt b/CMakeLists.txt index a9d2b0858..6bdb7a761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,9 +15,9 @@ include(CTest) # Set bundled sdl2/qt as dependent options. # OFF by default, but if ENABLE_SDL2 and MSVC are true then ON option(ENABLE_SDL2 "Enable the SDL2 frontend" ON) -CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF) +CMAKE_DEPENDENT_OPTION(CITRON_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF) # On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion -CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF) +CMAKE_DEPENDENT_OPTION(CITRON_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF) cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF) @@ -28,45 +28,45 @@ option(ENABLE_QT6 "Allow usage of Qt6 to be attempted" OFF) set(QT6_LOCATION "" CACHE PATH "Additional Location to search for Qt6 libraries like C:/Qt/6.3.1/msvc2019_64/") option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) -CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF) +CMAKE_DEPENDENT_OPTION(CITRON_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF) option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) -option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}") +option(CITRON_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}") -option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON) +option(CITRON_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON) -option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON) +option(CITRON_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON) -option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF) +option(CITRON_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF) -option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) +option(CITRON_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) -option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}") +option(CITRON_TESTS "Compile tests" "${BUILD_TESTING}") -option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) +option(CITRON_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) -option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON) +option(CITRON_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON) -CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF) +CMAKE_DEPENDENT_OPTION(CITRON_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF) -CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF) +CMAKE_DEPENDENT_OPTION(CITRON_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF) -option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for citron dependencies" "${MSVC}") +option(CITRON_USE_BUNDLED_VCPKG "Use vcpkg for citron dependencies" "${MSVC}") -option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON) +option(CITRON_CHECK_SUBMODULES "Check if submodules are present" ON) -option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF) +option(CITRON_ENABLE_LTO "Enable link-time optimization" OFF) -option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF) +option(CITRON_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF) -option(YUZU_ENABLE_PORTABLE "Allow citron to enable portable mode if a user folder is found in the CWD" ON) +option(CITRON_ENABLE_PORTABLE "Allow citron to enable portable mode if a user folder is found in the CWD" ON) -CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF) +CMAKE_DEPENDENT_OPTION(CITRON_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF) CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF) @@ -82,7 +82,7 @@ if (ANDROID OR WIN32 OR APPLE) endif() option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL}) -if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL) +if (ANDROID AND CITRON_DOWNLOAD_ANDROID_VVL) set(vvl_version "sdk-1.3.261.1") set(vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip") if (NOT EXISTS "${vvl_zip_file}") @@ -104,7 +104,7 @@ if (ANDROID) set(CMAKE_SKIP_INSTALL_RULES ON) endif() -if (YUZU_USE_BUNDLED_VCPKG) +if (CITRON_USE_BUNDLED_VCPKG) if (ANDROID) set(ENV{ANDROID_NDK_HOME} "${ANDROID_NDK}") list(APPEND VCPKG_MANIFEST_FEATURES "android") @@ -138,7 +138,7 @@ if (YUZU_USE_BUNDLED_VCPKG) endif() endif() - if (YUZU_TESTS) + if (CITRON_TESTS) list(APPEND VCPKG_MANIFEST_FEATURES "citron-tests") endif() if (ENABLE_WEB_SERVICE) @@ -155,16 +155,16 @@ elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") include("$ENV{VCPKG_TOOLCHAIN_FILE}") endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) if (MSVC AND CCACHE) # buildcache does not properly cache PCH files, leading to compilation errors. # See https://github.com/mbitsnbites/buildcache/discussions/230 message(WARNING "buildcache does not properly support Precompiled Headers. Disabling PCH") set(DYNARMIC_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE) - set(YUZU_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE) + set(CITRON_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE) endif() endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) message(STATUS "Using Precompiled Headers.") set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON) endif() @@ -199,7 +199,7 @@ function(check_submodules_present) endforeach() endfunction() -if(EXISTS ${PROJECT_SOURCE_DIR}/.gitmodules AND YUZU_CHECK_SUBMODULES) +if(EXISTS ${PROJECT_SOURCE_DIR}/.gitmodules AND CITRON_CHECK_SUBMODULES) check_submodules_present() endif() configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc @@ -262,7 +262,7 @@ endif() message(STATUS "Target architecture: ${ARCHITECTURE}") if (UNIX) - add_definitions(-DYUZU_UNIX=1) + add_definitions(-DCITRON_UNIX=1) endif() if (ARCHITECTURE_arm64 AND (ANDROID OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")) @@ -306,11 +306,11 @@ find_package(VulkanMemoryAllocator CONFIG) find_package(ZLIB 1.2 REQUIRED) find_package(zstd 1.5 REQUIRED) -if (NOT YUZU_USE_EXTERNAL_VULKAN_HEADERS) +if (NOT CITRON_USE_EXTERNAL_VULKAN_HEADERS) find_package(VulkanHeaders 1.3.274 REQUIRED) endif() -if (NOT YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES) +if (NOT CITRON_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES) find_package(VulkanUtilityLibraries REQUIRED) endif() @@ -343,7 +343,7 @@ if (ENABLE_WEB_SERVICE) find_package(httplib 0.12 MODULE COMPONENTS OpenSSL) endif() -if (YUZU_TESTS) +if (CITRON_TESTS) find_package(Catch2 3.0.1 REQUIRED) endif() @@ -367,23 +367,23 @@ endif() function(set_citron_qt_components) # Best practice is to ask for all components at once, so they are from the same version - set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent) + set(CITRON_QT_COMPONENTS2 Core Widgets Concurrent) if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - list(APPEND YUZU_QT_COMPONENTS2 DBus) + list(APPEND CITRON_QT_COMPONENTS2 DBus) endif() - if (YUZU_USE_QT_MULTIMEDIA) - list(APPEND YUZU_QT_COMPONENTS2 Multimedia) + if (CITRON_USE_QT_MULTIMEDIA) + list(APPEND CITRON_QT_COMPONENTS2 Multimedia) endif() - if (YUZU_USE_QT_WEB_ENGINE) - list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets) + if (CITRON_USE_QT_WEB_ENGINE) + list(APPEND CITRON_QT_COMPONENTS2 WebEngineCore WebEngineWidgets) endif() if (ENABLE_QT_TRANSLATION) - list(APPEND YUZU_QT_COMPONENTS2 LinguistTools) + list(APPEND CITRON_QT_COMPONENTS2 LinguistTools) endif() if (USE_DISCORD_PRESENCE) - list(APPEND YUZU_QT_COMPONENTS2 Network) + list(APPEND CITRON_QT_COMPONENTS2 Network) endif() - set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE) + set(CITRON_QT_COMPONENTS ${CITRON_QT_COMPONENTS2} PARENT_SCOPE) endfunction(set_citron_qt_components) # Qt5 requires that we find components, so it doesn't fit our pretty little find package function @@ -395,7 +395,7 @@ if(ENABLE_QT) set_citron_qt_components() if (ENABLE_QT6) - find_package(Qt6 ${QT6_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS}) + find_package(Qt6 ${QT6_VERSION} COMPONENTS ${CITRON_QT_COMPONENTS}) endif() if (Qt6_FOUND) message(STATUS "citron/CMakeLists.txt: Qt6Widgets_VERSION ${Qt6Widgets_VERSION}, setting QT_VERSION") @@ -409,13 +409,13 @@ if(ENABLE_QT) set(QT_DEFAULT_MAJOR_VERSION 5) set(QT_MAJOR_VERSION 5) - set(YUZU_USE_QT_MULTIMEDIA ON) + set(CITRON_USE_QT_MULTIMEDIA ON) # Check for system Qt on Linux, fallback to bundled Qt if (UNIX AND NOT APPLE) - if (NOT YUZU_USE_BUNDLED_QT) + if (NOT CITRON_USE_BUNDLED_QT) find_package(Qt5 ${QT5_VERSION} COMPONENTS Widgets DBus Multimedia) endif() - if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND (NOT Qt5_FOUND OR YUZU_USE_BUNDLED_QT)) + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND (NOT Qt5_FOUND OR CITRON_USE_BUNDLED_QT)) # Check for dependencies, then enable bundled Qt download # Check that the system GLIBCXX version is compatible @@ -489,23 +489,23 @@ if(ENABLE_QT) message(FATAL_ERROR "Bundled Qt package missing required dependencies: ${UNRESOLVED_QT_DEPS}") endif() - set(YUZU_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE) + set(CITRON_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE) endif() - if (YUZU_USE_BUNDLED_QT) + if (CITRON_USE_BUNDLED_QT) # Binary package currently does not support Qt webengine, so make sure it's disabled - set(YUZU_USE_QT_WEB_ENGINE OFF CACHE BOOL "Use Qt Webengine" FORCE) + set(CITRON_USE_QT_WEB_ENGINE OFF CACHE BOOL "Use Qt Webengine" FORCE) endif() endif() - set(YUZU_QT_NO_CMAKE_SYSTEM_PATH) + set(CITRON_QT_NO_CMAKE_SYSTEM_PATH) - if(YUZU_USE_BUNDLED_QT) + if(CITRON_USE_BUNDLED_QT) if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) set(QT_BUILD qt-5.15.2-msvc2019_64) elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64) set(QT_BUILD qt5_5_15_2) else() - message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.") + message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable CITRON_USE_BUNDLED_QT and provide your own.") endif() if (DEFINED QT_BUILD) @@ -514,25 +514,25 @@ if(ENABLE_QT) set(QT_PREFIX_HINT HINTS "${QT_PREFIX}") - set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH") + set(CITRON_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH") # Binary package for Qt5 has Qt Multimedia - set(YUZU_USE_QT_MULTIMEDIA ON CACHE BOOL "Use Qt Multimedia" FORCE) + set(CITRON_USE_QT_MULTIMEDIA ON CACHE BOOL "Use Qt Multimedia" FORCE) endif() set_citron_qt_components() - find_package(Qt5 ${QT5_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS} ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH}) + find_package(Qt5 ${QT5_VERSION} COMPONENTS ${CITRON_QT_COMPONENTS} ${QT_PREFIX_HINT} ${CITRON_QT_NO_CMAKE_SYSTEM_PATH}) endif() endif() # find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the citron_find_package if (ENABLE_SDL2) - if (YUZU_USE_BUNDLED_SDL2) + if (CITRON_USE_BUNDLED_SDL2) # Detect toolchain and platform if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) set(SDL2_VER "SDL2-2.28.2") else() - message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.") + message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable CITRON_USE_BUNDLED_SDL2 and provide your own.") endif() if (DEFINED SDL2_VER) @@ -547,7 +547,7 @@ if (ENABLE_SDL2) add_library(SDL2::SDL2 INTERFACE IMPORTED) target_link_libraries(SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}") target_include_directories(SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}") - elseif (YUZU_USE_EXTERNAL_SDL2) + elseif (CITRON_USE_EXTERNAL_SDL2) message(STATUS "Using SDL2 from externals.") else() find_package(SDL2 2.26.4 REQUIRED) @@ -565,12 +565,12 @@ if (UNIX AND NOT APPLE AND NOT ANDROID) find_package(PkgConfig REQUIRED) pkg_check_modules(LIBVA libva) endif() -if (NOT YUZU_USE_BUNDLED_FFMPEG) +if (NOT CITRON_USE_BUNDLED_FFMPEG) # Use system installed FFmpeg find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS}) endif() -if (WIN32 AND YUZU_CRASH_DUMPS) +if (WIN32 AND CITRON_CRASH_DUMPS) set(BREAKPAD_VER "breakpad-c89f9dd") download_bundled_external("breakpad/" ${BREAKPAD_VER} BREAKPAD_PREFIX) @@ -685,7 +685,7 @@ if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja") ) endif() -if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +if (CITRON_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # We will assume that if the compiler is GCC, it will attempt to use ld.bfd by default. # Try to pick a faster linker. find_program(LLD lld) diff --git a/CMakeModules/CopycitronQt5Deps.cmake b/CMakeModules/CopycitronQt5Deps.cmake index 2d47c1a39..af58151d7 100644 --- a/CMakeModules/CopycitronQt5Deps.cmake +++ b/CMakeModules/CopycitronQt5Deps.cmake @@ -29,12 +29,12 @@ function(copy_citron_Qt5_deps target_dir) Qt5Widgets$<$:d>.* Qt5Network$<$:d>.* ) - if (YUZU_USE_QT_MULTIMEDIA) + if (CITRON_USE_QT_MULTIMEDIA) windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} Qt5Multimedia$<$:d>.* ) endif() - if (YUZU_USE_QT_WEB_ENGINE) + if (CITRON_USE_QT_WEB_ENGINE) windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} Qt5Network$<$:d>.* Qt5Positioning$<$:d>.* diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index ef549648b..117683423 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -63,7 +63,7 @@ if (ENABLE_LIBUSB AND NOT TARGET libusb::usb) endif() # SDL2 -if (YUZU_USE_EXTERNAL_SDL2) +if (CITRON_USE_EXTERNAL_SDL2) if (NOT WIN32) # Citron itself needs: Atomic Audio Events Joystick Haptic Sensor Threads Timers # Since 2.0.18 Atomic+Threads required for HIDAPI/libusb (see https://github.com/libsdl-org/SDL/issues/5095) @@ -142,7 +142,7 @@ if (NOT TARGET Opus::opus) endif() # FFMpeg -if (YUZU_USE_BUNDLED_FFMPEG) +if (CITRON_USE_BUNDLED_FFMPEG) add_subdirectory(ffmpeg) set(FFmpeg_PATH "${FFmpeg_PATH}" PARENT_SCOPE) set(FFmpeg_LDFLAGS "${FFmpeg_LDFLAGS}" PARENT_SCOPE) @@ -151,12 +151,12 @@ if (YUZU_USE_BUNDLED_FFMPEG) endif() # Vulkan-Headers -if (YUZU_USE_EXTERNAL_VULKAN_HEADERS) +if (CITRON_USE_EXTERNAL_VULKAN_HEADERS) add_subdirectory(Vulkan-Headers) endif() # Vulkan-Utility-Libraries -if (YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES) +if (CITRON_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES) add_subdirectory(Vulkan-Utility-Libraries) endif() @@ -210,7 +210,7 @@ endif() # Breakpad # https://github.com/microsoft/vcpkg/blob/master/ports/breakpad/CMakeLists.txt -if (YUZU_CRASH_DUMPS AND NOT TARGET libbreakpad_client) +if (CITRON_CRASH_DUMPS AND NOT TARGET libbreakpad_client) set(BREAKPAD_WIN32_DEFINES NOMINMAX UNICODE diff --git a/externals/nx_tzdb/CMakeLists.txt b/externals/nx_tzdb/CMakeLists.txt index 13723f175..9fe251c1d 100644 --- a/externals/nx_tzdb/CMakeLists.txt +++ b/externals/nx_tzdb/CMakeLists.txt @@ -32,7 +32,7 @@ set(NX_TZDB_ARCHIVE "${CMAKE_CURRENT_BINARY_DIR}/${NX_TZDB_VERSION}.zip") set(NX_TZDB_ROMFS_DIR "${CMAKE_CURRENT_BINARY_DIR}/nx_tzdb") -if ((NOT CAN_BUILD_NX_TZDB OR YUZU_DOWNLOAD_TIME_ZONE_DATA) AND NOT EXISTS ${NX_TZDB_ROMFS_DIR}) +if ((NOT CAN_BUILD_NX_TZDB OR CITRON_DOWNLOAD_TIME_ZONE_DATA) AND NOT EXISTS ${NX_TZDB_ROMFS_DIR}) set(NX_TZDB_DOWNLOAD_URL "https://github.com/lat9nq/tzdb_to_nx/releases/download/${NX_TZDB_VERSION}/${NX_TZDB_VERSION}.zip") message(STATUS "Downloading time zone data from ${NX_TZDB_DOWNLOAD_URL}...") @@ -48,7 +48,7 @@ if ((NOT CAN_BUILD_NX_TZDB OR YUZU_DOWNLOAD_TIME_ZONE_DATA) AND NOT EXISTS ${NX_ ${NX_TZDB_ARCHIVE} DESTINATION ${NX_TZDB_ROMFS_DIR}) -elseif (CAN_BUILD_NX_TZDB AND NOT YUZU_DOWNLOAD_TIME_ZONE_DATA) +elseif (CAN_BUILD_NX_TZDB AND NOT CITRON_DOWNLOAD_TIME_ZONE_DATA) add_subdirectory(tzdb_to_nx) add_dependencies(nx_tzdb x80e) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e05298113..1c4e6a885 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,7 +88,7 @@ if (MSVC) /wd4702 # unreachable code (when used with LTO) ) - if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS) + if (USE_CCACHE OR CITRON_USE_PRECOMPILED_HEADERS) # when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21 add_compile_options(/Z7) @@ -192,11 +192,11 @@ add_subdirectory(input_common) add_subdirectory(frontend_common) add_subdirectory(shader_recompiler) -if (YUZU_ROOM) +if (CITRON_ROOM) add_subdirectory(dedicated_room) endif() -if (YUZU_TESTS) +if (CITRON_TESTS) add_subdirectory(tests) endif() diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index 414fdd562..6fa1dc0c7 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -172,9 +172,9 @@ android { "-DENABLE_WEB_SERVICE=0", // Don't use telemetry "-DBUNDLE_SPEEX=ON", "-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work - "-DYUZU_USE_BUNDLED_VCPKG=ON", - "-DYUZU_USE_BUNDLED_FFMPEG=ON", - "-DYUZU_ENABLE_LTO=ON", + "-DCITRON_USE_BUNDLED_VCPKG=ON", + "-DCITRON_USE_BUNDLED_FFMPEG=ON", + "-DCITRON_ENABLE_LTO=ON", "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ) diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index 4e4ed1789..e6d35fd4f 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -262,7 +262,7 @@ if (ANDROID) target_compile_definitions(audio_core PRIVATE HAVE_OBOE) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(audio_core PRIVATE precompiled_headers.h) endif() diff --git a/src/citron/CMakeLists.txt b/src/citron/CMakeLists.txt index 5e6938777..f6de195bf 100644 --- a/src/citron/CMakeLists.txt +++ b/src/citron/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Set the RPATH for Qt Libraries # This must be done before the `citron` target is created -if (YUZU_USE_BUNDLED_QT AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")) +if (CITRON_USE_BUNDLED_QT AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")) set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/bin/lib/") endif() @@ -233,14 +233,14 @@ add_executable(citron citron.rc ) -if (YUZU_CRASH_DUMPS) +if (CITRON_CRASH_DUMPS) target_sources(citron PRIVATE breakpad.cpp breakpad.h ) target_link_libraries(citron PRIVATE libbreakpad_client) - target_compile_definitions(citron PRIVATE YUZU_CRASH_DUMPS) + target_compile_definitions(citron PRIVATE CITRON_CRASH_DUMPS) endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -256,7 +256,7 @@ file(GLOB_RECURSE ICONS ${PROJECT_SOURCE_DIR}/dist/icons/*) file(GLOB_RECURSE THEMES ${PROJECT_SOURCE_DIR}/dist/qt_themes/*) if (ENABLE_QT_TRANSLATION) - set(YUZU_QT_LANGUAGES "${PROJECT_SOURCE_DIR}/dist/languages" CACHE PATH "Path to the translation bundle for the Qt frontend") + set(CITRON_QT_LANGUAGES "${PROJECT_SOURCE_DIR}/dist/languages" CACHE PATH "Path to the translation bundle for the Qt frontend") option(GENERATE_QT_TRANSLATION "Generate en.ts as the translation source file" OFF) option(WORKAROUND_BROKEN_LUPDATE "Run lupdate directly through CMake if Qt's convenience wrappers don't work" OFF) @@ -265,15 +265,15 @@ if (ENABLE_QT_TRANSLATION) get_target_property(SRCS citron SOURCES) # these calls to qt_create_translation also creates a rule to generate en.qm which conflicts with providing english plurals # so we have to set a OUTPUT_LOCATION so that we don't have multiple rules to generate en.qm - set_source_files_properties(${YUZU_QT_LANGUAGES}/en.ts PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations") + set_source_files_properties(${CITRON_QT_LANGUAGES}/en.ts PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations") if (WORKAROUND_BROKEN_LUPDATE) - add_custom_command(OUTPUT ${YUZU_QT_LANGUAGES}/en.ts + add_custom_command(OUTPUT ${CITRON_QT_LANGUAGES}/en.ts COMMAND lupdate -source-language en_US -target-language en_US ${SRCS} ${UIS} - -ts ${YUZU_QT_LANGUAGES}/en.ts + -ts ${CITRON_QT_LANGUAGES}/en.ts DEPENDS ${SRCS} ${UIS} @@ -284,7 +284,7 @@ if (ENABLE_QT_TRANSLATION) qt_create_translation(QM_FILES ${SRCS} ${UIS} - ${YUZU_QT_LANGUAGES}/en.ts + ${CITRON_QT_LANGUAGES}/en.ts OPTIONS -source-language en_US -target-language en_US @@ -312,12 +312,12 @@ if (ENABLE_QT_TRANSLATION) qt_create_translation(QM_FILES ${SRCS} ${UIS} ${GENERATED_PLURALS_FILE} OPTIONS -pluralonly -source-language en_US -target-language en_US) endif() - add_custom_target(translation ALL DEPENDS ${YUZU_QT_LANGUAGES}/en.ts ${GENERATED_PLURALS_FILE}) + add_custom_target(translation ALL DEPENDS ${CITRON_QT_LANGUAGES}/en.ts ${GENERATED_PLURALS_FILE}) endif() # Find all TS files except en.ts - file(GLOB_RECURSE LANGUAGES_TS ${YUZU_QT_LANGUAGES}/*.ts) - list(REMOVE_ITEM LANGUAGES_TS ${YUZU_QT_LANGUAGES}/en.ts) + file(GLOB_RECURSE LANGUAGES_TS ${CITRON_QT_LANGUAGES}/*.ts) + list(REMOVE_ITEM LANGUAGES_TS ${CITRON_QT_LANGUAGES}/en.ts) # Compile TS files to QM files qt_add_translation(LANGUAGES_QM ${LANGUAGES_TS}) @@ -412,8 +412,8 @@ target_compile_definitions(citron PRIVATE -DQT_NO_URL_CAST_FROM_STRING ) -if (YUZU_ENABLE_COMPATIBILITY_REPORTING) - target_compile_definitions(citron PRIVATE -DYUZU_ENABLE_COMPATIBILITY_REPORTING) +if (CITRON_ENABLE_COMPATIBILITY_REPORTING) + target_compile_definitions(citron PRIVATE -DCITRON_ENABLE_COMPATIBILITY_REPORTING) endif() if (USE_DISCORD_PRESENCE) @@ -429,14 +429,14 @@ if (ENABLE_WEB_SERVICE) target_compile_definitions(citron PRIVATE -DENABLE_WEB_SERVICE) endif() -if (YUZU_USE_QT_MULTIMEDIA) +if (CITRON_USE_QT_MULTIMEDIA) target_link_libraries(citron PRIVATE Qt${QT_MAJOR_VERSION}::Multimedia) - target_compile_definitions(citron PRIVATE -DYUZU_USE_QT_MULTIMEDIA) + target_compile_definitions(citron PRIVATE -DCITRON_USE_QT_MULTIMEDIA) endif () -if (YUZU_USE_QT_WEB_ENGINE) +if (CITRON_USE_QT_WEB_ENGINE) target_link_libraries(citron PRIVATE Qt${QT_MAJOR_VERSION}::WebEngineCore Qt${QT_MAJOR_VERSION}::WebEngineWidgets) - target_compile_definitions(citron PRIVATE -DYUZU_USE_QT_WEB_ENGINE) + target_compile_definitions(citron PRIVATE -DCITRON_USE_QT_WEB_ENGINE) endif () if(UNIX AND NOT APPLE) @@ -444,11 +444,11 @@ if(UNIX AND NOT APPLE) endif() if (WIN32 AND QT_VERSION VERSION_GREATER_EQUAL 6) - set(YUZU_EXE_DIR "$") - add_custom_command(TARGET citron POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/citron.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0) + set(CITRON_EXE_DIR "$") + add_custom_command(TARGET citron POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${CITRON_EXE_DIR}/citron.exe" --dir "${CITRON_EXE_DIR}" --libdir "${CITRON_EXE_DIR}" --plugindir "${CITRON_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0) endif() -if (YUZU_USE_BUNDLED_QT AND QT_VERSION VERSION_LESS 6) +if (CITRON_USE_BUNDLED_QT AND QT_VERSION VERSION_LESS 6) include(CopyCitronQt5Deps) copy_citron_Qt5_deps(citron) endif() @@ -473,7 +473,7 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) target_link_libraries(citron PRIVATE dynarmic::dynarmic) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(citron PRIVATE precompiled_headers.h) endif() diff --git a/src/citron/applets/qt_web_browser.cpp b/src/citron/applets/qt_web_browser.cpp index 2f3d4c410..c8eb43f0c 100644 --- a/src/citron/applets/qt_web_browser.cpp +++ b/src/citron/applets/qt_web_browser.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE #include #include @@ -24,7 +24,7 @@ #include "citron/main.h" #include "citron/util/url_request_interceptor.h" -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE namespace { diff --git a/src/citron/applets/qt_web_browser.h b/src/citron/applets/qt_web_browser.h index 9fa789545..d1b299247 100644 --- a/src/citron/applets/qt_web_browser.h +++ b/src/citron/applets/qt_web_browser.h @@ -8,7 +8,7 @@ #include -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE #include #endif @@ -30,7 +30,7 @@ namespace InputCommon { class InputSubsystem; } -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE enum class UserAgent { WebApplet, diff --git a/src/citron/bootmanager.cpp b/src/citron/bootmanager.cpp index 0f1681cb2..b02b8f663 100644 --- a/src/citron/bootmanager.cpp +++ b/src/citron/bootmanager.cpp @@ -13,7 +13,7 @@ #include #include "common/settings_enums.h" #include "uisettings.h" -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA #include #include #include @@ -760,7 +760,7 @@ void GRenderWindow::TouchEndEvent() { } void GRenderWindow::InitializeCamera() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA constexpr auto camera_update_ms = std::chrono::milliseconds{50}; // (50ms, 20Hz) if (!Settings::values.enable_ir_sensor) { return; @@ -821,7 +821,7 @@ void GRenderWindow::InitializeCamera() { } void GRenderWindow::FinalizeCamera() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA if (camera_timer) { camera_timer->stop(); } @@ -832,7 +832,7 @@ void GRenderWindow::FinalizeCamera() { } void GRenderWindow::RequestCameraCapture() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA if (!Settings::values.enable_ir_sensor) { return; } @@ -853,7 +853,7 @@ void GRenderWindow::RequestCameraCapture() { } void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA // TODO: Capture directly in the format and resolution needed const auto camera_width = input_subsystem->GetCamera()->getImageWidth(); const auto camera_height = input_subsystem->GetCamera()->getImageHeight(); diff --git a/src/citron/bootmanager.h b/src/citron/bootmanager.h index ae12b3481..e53dfaf78 100644 --- a/src/citron/bootmanager.h +++ b/src/citron/bootmanager.h @@ -261,7 +261,7 @@ private: bool first_frame = false; InputCommon::TasInput::TasState last_tas_state; -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA bool is_virtual_camera; int pending_camera_snapshots; std::vector camera_data; diff --git a/src/citron/configuration/configure_camera.cpp b/src/citron/configuration/configure_camera.cpp index dd38fc37b..2cd7bb9c0 100644 --- a/src/citron/configuration/configure_camera.cpp +++ b/src/citron/configuration/configure_camera.cpp @@ -3,7 +3,7 @@ #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA #include #include #endif @@ -36,7 +36,7 @@ ConfigureCamera::ConfigureCamera(QWidget* parent, InputCommon::InputSubsystem* i ConfigureCamera::~ConfigureCamera() = default; void ConfigureCamera::PreviewCamera() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA const auto index = ui->ir_sensor_combo_box->currentIndex(); bool camera_found = false; const QList cameras = QCameraInfo::availableCameras(); @@ -138,7 +138,7 @@ void ConfigureCamera::LoadConfiguration() { ui->ir_sensor_combo_box->clear(); input_devices.push_back("Auto"); ui->ir_sensor_combo_box->addItem(tr("Auto")); -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA const auto cameras = QCameraInfo::availableCameras(); for (const QCameraInfo& cameraInfo : cameras) { input_devices.push_back(cameraInfo.deviceName().toStdString()); diff --git a/src/citron/configuration/configure_camera.h b/src/citron/configuration/configure_camera.h index 3d822da7b..5d3d02911 100644 --- a/src/citron/configuration/configure_camera.h +++ b/src/citron/configuration/configure_camera.h @@ -46,7 +46,7 @@ private: bool is_virtual_camera; int pending_snapshots; -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && CITRON_USE_QT_MULTIMEDIA std::unique_ptr camera; std::unique_ptr camera_capture; #endif diff --git a/src/citron/configuration/configure_debug.cpp b/src/citron/configuration/configure_debug.cpp index 69356bab7..0a3ed298c 100644 --- a/src/citron/configuration/configure_debug.cpp +++ b/src/citron/configuration/configure_debug.cpp @@ -75,7 +75,7 @@ void ConfigureDebug::SetConfiguration() { ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue()); ui->perform_vulkan_check->setChecked(Settings::values.perform_vulkan_check.GetValue()); -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE ui->disable_web_applet->setChecked(UISettings::values.disable_web_applet.GetValue()); #else ui->disable_web_applet->setEnabled(false); diff --git a/src/citron/configuration/configure_input_advanced.cpp b/src/citron/configuration/configure_input_advanced.cpp index eb274cee2..198719727 100644 --- a/src/citron/configuration/configure_input_advanced.cpp +++ b/src/citron/configuration/configure_input_advanced.cpp @@ -197,7 +197,7 @@ void ConfigureInputAdvanced::UpdateUIEnabled() { ui->debug_configure->setEnabled(ui->debug_enabled->isChecked()); ui->touchscreen_advanced->setEnabled(ui->touchscreen_enabled->isChecked()); ui->ring_controller_configure->setEnabled(ui->enable_ring_controller->isChecked()); -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) || !defined(YUZU_USE_QT_MULTIMEDIA) +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) || !defined(CITRON_USE_QT_MULTIMEDIA) ui->enable_ir_sensor->setEnabled(false); ui->camera_configure->setEnabled(false); #endif diff --git a/src/citron/loading_screen.cpp b/src/citron/loading_screen.cpp index d34d7cea4..99b697c39 100644 --- a/src/citron/loading_screen.cpp +++ b/src/citron/loading_screen.cpp @@ -19,7 +19,7 @@ // Mingw seems to not have QMovie at all. If QMovie is missing then use a single frame instead of an // showing the full animation -#if !YUZU_QT_MOVIE_MISSING +#if !CITRON_QT_MOVIE_MISSING #include #endif @@ -96,7 +96,7 @@ LoadingScreen::~LoadingScreen() = default; void LoadingScreen::Prepare(Loader::AppLoader& loader) { std::vector buffer; if (loader.ReadBanner(buffer) == Loader::ResultStatus::Success) { -#ifdef YUZU_QT_MOVIE_MISSING +#ifdef CITRON_QT_MOVIE_MISSING QPixmap map; map.loadFromData(buffer.data(), buffer.size()); ui->banner->setPixmap(map); @@ -194,7 +194,7 @@ void LoadingScreen::paintEvent(QPaintEvent* event) { } void LoadingScreen::Clear() { -#ifndef YUZU_QT_MOVIE_MISSING +#ifndef CITRON_QT_MOVIE_MISSING animation.reset(); backing_buf.reset(); backing_mem.reset(); diff --git a/src/citron/loading_screen.h b/src/citron/loading_screen.h index 17045595d..dae3c4c6a 100644 --- a/src/citron/loading_screen.h +++ b/src/citron/loading_screen.h @@ -10,7 +10,7 @@ #include #if !QT_CONFIG(movie) -#define YUZU_QT_MOVIE_MISSING 1 +#define CITRON_QT_MOVIE_MISSING 1 #endif namespace Loader { @@ -64,7 +64,7 @@ signals: void Hidden(); private: -#ifndef YUZU_QT_MOVIE_MISSING +#ifndef CITRON_QT_MOVIE_MISSING std::unique_ptr animation; std::unique_ptr backing_buf; std::unique_ptr backing_mem; diff --git a/src/citron/main.cpp b/src/citron/main.cpp index a86c89747..6e4427518 100644 --- a/src/citron/main.cpp +++ b/src/citron/main.cpp @@ -163,7 +163,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include "citron/util/clickable_label.h" #include "citron/vk_device_info.h" -#ifdef YUZU_CRASH_DUMPS +#ifdef CITRON_CRASH_DUMPS #include "citron/breakpad.h" #endif @@ -848,7 +848,7 @@ void GMainWindow::SoftwareKeyboardExit() { void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url, const std::string& additional_args, bool is_local) { -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE // Raw input breaks with the web applet, Disable web applets if enabled if (UISettings::values.disable_web_applet || Settings::values.enable_raw_input) { @@ -989,7 +989,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url, } void GMainWindow::WebBrowserRequestExit() { -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE if (web_applet) { web_applet->SetExitReason(Service::AM::Frontend::WebExitReason::ExitRequested); web_applet->SetFinished(true); @@ -998,7 +998,7 @@ void GMainWindow::WebBrowserRequestExit() { } void GMainWindow::InitializeWidgets() { -#ifdef YUZU_ENABLE_COMPATIBILITY_REPORTING +#ifdef CITRON_ENABLE_COMPATIBILITY_REPORTING ui->action_Report_Compatibility->setVisible(true); #endif render_window = new GRenderWindow(this, emu_thread.get(), input_subsystem, *system); @@ -5258,7 +5258,7 @@ int main(int argc, char* argv[]) { return 0; } -#ifdef YUZU_CRASH_DUMPS +#ifdef CITRON_CRASH_DUMPS Breakpad::InstallCrashHandler(); #endif diff --git a/src/citron/play_time_manager.h b/src/citron/play_time_manager.h index 1714b9131..7ced9162d 100644 --- a/src/citron/play_time_manager.h +++ b/src/citron/play_time_manager.h @@ -26,8 +26,8 @@ public: explicit PlayTimeManager(Service::Account::ProfileManager& profile_manager); ~PlayTimeManager(); - YUZU_NON_COPYABLE(PlayTimeManager); - YUZU_NON_MOVEABLE(PlayTimeManager); + CITRON_NON_COPYABLE(PlayTimeManager); + CITRON_NON_MOVEABLE(PlayTimeManager); u64 GetPlayTime(u64 program_id) const; void ResetProgramPlayTime(u64 program_id); diff --git a/src/citron/startup_checks.cpp b/src/citron/startup_checks.cpp index 782cfc1f3..99d0bb916 100644 --- a/src/citron/startup_checks.cpp +++ b/src/citron/startup_checks.cpp @@ -7,7 +7,7 @@ #include #include #include -#elif defined(YUZU_UNIX) +#elif defined(CITRON_UNIX) #include #include #include @@ -56,7 +56,7 @@ bool CheckEnvVars(bool* is_child) { IS_CHILD_ENV_VAR, GetLastError()); return true; } -#elif defined(YUZU_UNIX) +#elif defined(CITRON_UNIX) const char* startup_check_var = getenv(STARTUP_CHECK_ENV_VAR); if (startup_check_var != nullptr && std::strncmp(startup_check_var, ENV_VAR_ENABLED_TEXT, 8) == 0) { @@ -110,7 +110,7 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan, bool perform_vulka STARTUP_CHECK_ENV_VAR, GetLastError()); } -#elif defined(YUZU_UNIX) +#elif defined(CITRON_UNIX) const int env_var_set = setenv(STARTUP_CHECK_ENV_VAR, ENV_VAR_ENABLED_TEXT, 1); if (env_var_set == -1) { const int err = errno; @@ -175,7 +175,7 @@ bool SpawnChild(const char* arg0, PROCESS_INFORMATION* pi, int flags) { return true; } -#elif defined(YUZU_UNIX) +#elif defined(CITRON_UNIX) pid_t SpawnChild(const char* arg0) { const pid_t pid = fork(); diff --git a/src/citron/startup_checks.h b/src/citron/startup_checks.h index 2f86fb843..3d8c70c82 100644 --- a/src/citron/startup_checks.h +++ b/src/citron/startup_checks.h @@ -5,12 +5,12 @@ #ifdef _WIN32 #include -#elif defined(YUZU_UNIX) +#elif defined(CITRON_UNIX) #include #endif -constexpr char IS_CHILD_ENV_VAR[] = "YUZU_IS_CHILD"; -constexpr char STARTUP_CHECK_ENV_VAR[] = "YUZU_DO_STARTUP_CHECKS"; +constexpr char IS_CHILD_ENV_VAR[] = "CITRON_IS_CHILD"; +constexpr char STARTUP_CHECK_ENV_VAR[] = "CITRON_DO_STARTUP_CHECKS"; constexpr char ENV_VAR_ENABLED_TEXT[] = "ON"; void CheckVulkan(); @@ -19,6 +19,6 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan, bool perform_vulka #ifdef _WIN32 bool SpawnChild(const char* arg0, PROCESS_INFORMATION* pi, int flags); -#elif defined(YUZU_UNIX) +#elif defined(CITRON_UNIX) pid_t SpawnChild(const char* arg0); #endif diff --git a/src/citron/util/url_request_interceptor.cpp b/src/citron/util/url_request_interceptor.cpp index 78ac890b4..fe1fb8da7 100644 --- a/src/citron/util/url_request_interceptor.cpp +++ b/src/citron/util/url_request_interceptor.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE #include "citron/util/url_request_interceptor.h" diff --git a/src/citron/util/url_request_interceptor.h b/src/citron/util/url_request_interceptor.h index 9831e1523..e269b930f 100644 --- a/src/citron/util/url_request_interceptor.h +++ b/src/citron/util/url_request_interceptor.h @@ -3,7 +3,7 @@ #pragma once -#ifdef YUZU_USE_QT_WEB_ENGINE +#ifdef CITRON_USE_QT_WEB_ENGINE #include #include diff --git a/src/citron_cmd/CMakeLists.txt b/src/citron_cmd/CMakeLists.txt index fa618d329..5ca550afb 100644 --- a/src/citron_cmd/CMakeLists.txt +++ b/src/citron_cmd/CMakeLists.txt @@ -58,7 +58,7 @@ if (MSVC) copy_citron_SDL_deps(citron-cmd) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(citron-cmd PRIVATE precompiled_headers.h) endif() diff --git a/src/citron_cmd/citron.rc b/src/citron_cmd/citron.rc index 97526e208..3891d90d7 100644 --- a/src/citron_cmd/citron.rc +++ b/src/citron_cmd/citron.rc @@ -9,7 +9,7 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -YUZU_ICON ICON "../../dist/citron.ico" +CITRON_ICON ICON "../../dist/citron.ico" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/citron_cmd/emu_window/emu_window_sdl2_null.cpp b/src/citron_cmd/emu_window/emu_window_sdl2_null.cpp index 5a5ebcb55..b70369009 100644 --- a/src/citron_cmd/emu_window/emu_window_sdl2_null.cpp +++ b/src/citron_cmd/emu_window/emu_window_sdl2_null.cpp @@ -12,7 +12,7 @@ #include "video_core/renderer_null/renderer_null.h" #include "citron_cmd/emu_window/emu_window_sdl2_null.h" -#ifdef YUZU_USE_EXTERNAL_SDL2 +#ifdef CITRON_USE_EXTERNAL_SDL2 // Include this before SDL.h to prevent the external from including a dummy #define USING_GENERATED_CONFIG_H #include diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 779be211e..823db6d64 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -161,8 +161,8 @@ add_library(common STATIC zstd_compression.h ) -if (YUZU_ENABLE_PORTABLE) - add_compile_definitions(YUZU_ENABLE_PORTABLE) +if (CITRON_ENABLE_PORTABLE) + add_compile_definitions(CITRON_ENABLE_PORTABLE) endif() if (WIN32) @@ -262,7 +262,7 @@ if (ANDROID) target_link_libraries(common PRIVATE android) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(common PRIVATE precompiled_headers.h) endif() diff --git a/src/common/assert.h b/src/common/assert.h index 67e7e9375..49d40dff1 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -14,13 +14,13 @@ void assert_fail_impl(); [[noreturn]] void unreachable_impl(); #ifdef _MSC_VER -#define YUZU_NO_INLINE __declspec(noinline) +#define CITRON_NO_INLINE __declspec(noinline) #else -#define YUZU_NO_INLINE __attribute__((noinline)) +#define CITRON_NO_INLINE __attribute__((noinline)) #endif #define ASSERT(_a_) \ - ([&]() YUZU_NO_INLINE { \ + ([&]() CITRON_NO_INLINE { \ if (!(_a_)) [[unlikely]] { \ LOG_CRITICAL(Debug, "Assertion Failed!"); \ assert_fail_impl(); \ @@ -28,7 +28,7 @@ void assert_fail_impl(); }()) #define ASSERT_MSG(_a_, ...) \ - ([&]() YUZU_NO_INLINE { \ + ([&]() CITRON_NO_INLINE { \ if (!(_a_)) [[unlikely]] { \ LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); \ assert_fail_impl(); \ diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index ba3081efb..5e0f7dc0a 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -109,11 +109,11 @@ __declspec(dllimport) void __stdcall DebugBreak(void); return static_cast(key) == 0; \ } -#define YUZU_NON_COPYABLE(cls) \ +#define CITRON_NON_COPYABLE(cls) \ cls(const cls&) = delete; \ cls& operator=(const cls&) = delete -#define YUZU_NON_MOVEABLE(cls) \ +#define CITRON_NON_MOVEABLE(cls) \ cls(cls&&) = delete; \ cls& operator=(cls&&) = delete diff --git a/src/common/fs/fs_paths.h b/src/common/fs/fs_paths.h index 30f3025af..8183f0096 100644 --- a/src/common/fs/fs_paths.h +++ b/src/common/fs/fs_paths.h @@ -5,7 +5,7 @@ // citron data directories -#define YUZU_DIR "citron" +#define CITRON_DIR "citron" #define PORTABLE_DIR "user" // Sub-directories contained within a citron data directory diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 10f0dee0e..a6f2593f0 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -88,11 +88,11 @@ public: fs::path citron_path_config; #ifdef _WIN32 -#ifdef YUZU_ENABLE_PORTABLE +#ifdef CITRON_ENABLE_PORTABLE citron_path = GetExeDirectory() / PORTABLE_DIR; #endif if (!IsDir(citron_path)) { - citron_path = GetAppDataRoamingDirectory() / YUZU_DIR; + citron_path = GetAppDataRoamingDirectory() / CITRON_DIR; } citron_path_cache = citron_path / CACHE_DIR; @@ -102,16 +102,16 @@ public: citron_path_cache = citron_path / CACHE_DIR; citron_path_config = citron_path / CONFIG_DIR; #else -#ifdef YUZU_ENABLE_PORTABLE +#ifdef CITRON_ENABLE_PORTABLE citron_path = GetCurrentDir() / PORTABLE_DIR; #endif if (Exists(citron_path) && IsDir(citron_path)) { citron_path_cache = citron_path / CACHE_DIR; citron_path_config = citron_path / CONFIG_DIR; } else { - citron_path = GetDataDirectory("XDG_DATA_HOME") / YUZU_DIR; - citron_path_cache = GetDataDirectory("XDG_CACHE_HOME") / YUZU_DIR; - citron_path_config = GetDataDirectory("XDG_CONFIG_HOME") / YUZU_DIR; + citron_path = GetDataDirectory("XDG_DATA_HOME") / CITRON_DIR; + citron_path_cache = GetDataDirectory("XDG_CACHE_HOME") / CITRON_DIR; + citron_path_config = GetDataDirectory("XDG_CONFIG_HOME") / CITRON_DIR; } #endif diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index d330dc1c2..334083a2d 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -16,7 +16,7 @@ class IntrusiveListImpl; } class IntrusiveListNode { - YUZU_NON_COPYABLE(IntrusiveListNode); + CITRON_NON_COPYABLE(IntrusiveListNode); private: friend class impl::IntrusiveListImpl; @@ -96,7 +96,7 @@ private: namespace impl { class IntrusiveListImpl { - YUZU_NON_COPYABLE(IntrusiveListImpl); + CITRON_NON_COPYABLE(IntrusiveListImpl); private: IntrusiveListNode m_root_node; @@ -302,7 +302,7 @@ private: template class IntrusiveList { - YUZU_NON_COPYABLE(IntrusiveList); + CITRON_NON_COPYABLE(IntrusiveList); private: impl::IntrusiveListImpl m_impl; diff --git a/src/common/intrusive_red_black_tree.h b/src/common/intrusive_red_black_tree.h index bc2940fa0..8dbf8d7ca 100644 --- a/src/common/intrusive_red_black_tree.h +++ b/src/common/intrusive_red_black_tree.h @@ -17,7 +17,7 @@ class IntrusiveRedBlackTreeImpl; #pragma pack(push, 4) struct IntrusiveRedBlackTreeNode { - YUZU_NON_COPYABLE(IntrusiveRedBlackTreeNode); + CITRON_NON_COPYABLE(IntrusiveRedBlackTreeNode); public: using RBEntry = freebsd::RBEntry; @@ -49,7 +49,7 @@ class IntrusiveRedBlackTree; namespace impl { class IntrusiveRedBlackTreeImpl { - YUZU_NON_COPYABLE(IntrusiveRedBlackTreeImpl); + CITRON_NON_COPYABLE(IntrusiveRedBlackTreeImpl); private: template @@ -261,7 +261,7 @@ using RedBlackKeyType = std::remove_pointer_t class IntrusiveRedBlackTree { - YUZU_NON_COPYABLE(IntrusiveRedBlackTree); + CITRON_NON_COPYABLE(IntrusiveRedBlackTree); public: using ImplType = impl::IntrusiveRedBlackTreeImpl; diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index f3e88cde9..4a399aceb 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h @@ -9,7 +9,7 @@ namespace detail { template class ScopeGuard { - YUZU_NON_COPYABLE(ScopeGuard); + CITRON_NON_COPYABLE(ScopeGuard); private: F f; diff --git a/src/common/telemetry.h b/src/common/telemetry.h index dc8fbb9f1..febf86c7a 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -52,7 +52,7 @@ public: template class Field : public FieldInterface { public: - YUZU_NON_COPYABLE(Field); + CITRON_NON_COPYABLE(Field); Field(FieldType type_, std::string_view name_, T value_) : name(name_), type(type_), value(std::move(value_)) {} @@ -101,7 +101,7 @@ private: */ class FieldCollection final { public: - YUZU_NON_COPYABLE(FieldCollection); + CITRON_NON_COPYABLE(FieldCollection); FieldCollection() = default; ~FieldCollection() = default; @@ -168,7 +168,7 @@ struct VisitorInterface { * backend implementation is not available. */ struct NullVisitor final : public VisitorInterface { - YUZU_NON_COPYABLE(NullVisitor); + CITRON_NON_COPYABLE(NullVisitor); NullVisitor() = default; ~NullVisitor() override = default; diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c7f4df802..9571c1ad9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1233,11 +1233,11 @@ else() hle/service/ssl/ssl_backend_none.cpp) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(core PRIVATE precompiled_headers.h) endif() -if (YUZU_ENABLE_LTO) +if (CITRON_ENABLE_LTO) set_property(TARGET core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) endif() diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 495963eef..11aa41a3d 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -47,8 +47,8 @@ enum class Architecture { /// Generic ARMv8 CPU interface class ArmInterface { public: - YUZU_NON_COPYABLE(ArmInterface); - YUZU_NON_MOVEABLE(ArmInterface); + CITRON_NON_COPYABLE(ArmInterface); + CITRON_NON_MOVEABLE(ArmInterface); explicit ArmInterface(bool uses_wall_clock) : m_uses_wall_clock{uses_wall_clock} {} virtual ~ArmInterface() = default; diff --git a/src/core/arm/nce/arm_nce.cpp b/src/core/arm/nce/arm_nce.cpp index 123b3da7e..9143928a9 100644 --- a/src/core/arm/nce/arm_nce.cpp +++ b/src/core/arm/nce/arm_nce.cpp @@ -160,8 +160,8 @@ bool ArmNce::HandleGuestAccessFault(GuestContext* guest_ctx, void* raw_info, voi // Try to handle an invalid access. // TODO: handle accesses which split a page? const Common::ProcessAddress addr = - (reinterpret_cast(info->si_addr) & ~Memory::YUZU_PAGEMASK); - if (guest_ctx->system->ApplicationMemory().InvalidateNCE(addr, Memory::YUZU_PAGESIZE)) { + (reinterpret_cast(info->si_addr) & ~Memory::CITRON_PAGEMASK); + if (guest_ctx->system->ApplicationMemory().InvalidateNCE(addr, Memory::CITRON_PAGESIZE)) { // We handled the access successfully and are returning to guest code. return true; } diff --git a/src/core/arm/nce/patcher.cpp b/src/core/arm/nce/patcher.cpp index c7285e3a0..8ddfaebf1 100644 --- a/src/core/arm/nce/patcher.cpp +++ b/src/core/arm/nce/patcher.cpp @@ -213,7 +213,7 @@ bool Patcher::RelocateAndCopy(Common::ProcessAddress load_base, } size_t Patcher::GetSectionSize() const noexcept { - return Common::AlignUp(m_patch_instructions.size() * sizeof(u32), Core::Memory::YUZU_PAGESIZE); + return Common::AlignUp(m_patch_instructions.size() * sizeof(u32), Core::Memory::CITRON_PAGESIZE); } void Patcher::WriteLoadContext() { diff --git a/src/core/device_memory_manager.inc b/src/core/device_memory_manager.inc index f104d495b..b4f6e6002 100644 --- a/src/core/device_memory_manager.inc +++ b/src/core/device_memory_manager.inc @@ -132,7 +132,7 @@ struct EmptyAllocator { template struct DeviceMemoryManagerAllocator { static constexpr size_t device_virtual_bits = DTraits::device_virtual_bits; - static constexpr DAddr first_address = 1ULL << Memory::YUZU_PAGEBITS; + static constexpr DAddr first_address = 1ULL << Memory::CITRON_PAGEBITS; static constexpr DAddr max_device_area = 1ULL << device_virtual_bits; DeviceMemoryManagerAllocator() : main_allocator(first_address) {} @@ -162,18 +162,18 @@ struct DeviceMemoryManagerAllocator { template DeviceMemoryManager::DeviceMemoryManager(const DeviceMemory& device_memory_) : physical_base{reinterpret_cast(device_memory_.buffer.BackingBasePointer())}, - device_inter{nullptr}, compressed_physical_ptr(device_as_size >> Memory::YUZU_PAGEBITS), + device_inter{nullptr}, compressed_physical_ptr(device_as_size >> Memory::CITRON_PAGEBITS), compressed_device_addr(1ULL << ((Settings::values.memory_layout_mode.GetValue() == Settings::MemoryLayout::Memory_4Gb ? physical_min_bits : physical_max_bits) - - Memory::YUZU_PAGEBITS)), - continuity_tracker(device_as_size >> Memory::YUZU_PAGEBITS), - cpu_backing_address(device_as_size >> Memory::YUZU_PAGEBITS) { + Memory::CITRON_PAGEBITS)), + continuity_tracker(device_as_size >> Memory::CITRON_PAGEBITS), + cpu_backing_address(device_as_size >> Memory::CITRON_PAGEBITS) { impl = std::make_unique>(); cached_pages = std::make_unique(); - const size_t total_virtual = device_as_size >> Memory::YUZU_PAGEBITS; + const size_t total_virtual = device_as_size >> Memory::CITRON_PAGEBITS; for (size_t i = 0; i < total_virtual; i++) { compressed_physical_ptr[i] = 0; continuity_tracker[i] = 1; @@ -183,7 +183,7 @@ DeviceMemoryManager::DeviceMemoryManager(const DeviceMemory& device_memo Settings::MemoryLayout::Memory_4Gb ? physical_min_bits : physical_max_bits) - - Memory::YUZU_PAGEBITS); + Memory::CITRON_PAGEBITS); for (size_t i = 0; i < total_phys; i++) { compressed_device_addr[i] = 0; } @@ -216,17 +216,17 @@ template void DeviceMemoryManager::Map(DAddr address, VAddr virtual_address, size_t size, Asid asid, bool track) { Core::Memory::Memory* process_memory = registered_processes[asid.id]; - size_t start_page_d = address >> Memory::YUZU_PAGEBITS; - size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS; + size_t start_page_d = address >> Memory::CITRON_PAGEBITS; + size_t num_pages = Common::AlignUp(size, Memory::CITRON_PAGESIZE) >> Memory::CITRON_PAGEBITS; std::scoped_lock lk(mapping_guard); for (size_t i = 0; i < num_pages; i++) { - const VAddr new_vaddress = virtual_address + i * Memory::YUZU_PAGESIZE; + const VAddr new_vaddress = virtual_address + i * Memory::CITRON_PAGESIZE; auto* ptr = process_memory->GetPointerSilent(Common::ProcessAddress(new_vaddress)); if (ptr == nullptr) [[unlikely]] { compressed_physical_ptr[start_page_d + i] = 0; continue; } - auto phys_addr = static_cast(GetRawPhysicalAddr(ptr) >> Memory::YUZU_PAGEBITS) + 1U; + auto phys_addr = static_cast(GetRawPhysicalAddr(ptr) >> Memory::CITRON_PAGEBITS) + 1U; compressed_physical_ptr[start_page_d + i] = phys_addr; InsertCPUBacking(start_page_d + i, new_vaddress, asid); const u32 base_dev = compressed_device_addr[phys_addr - 1U]; @@ -249,8 +249,8 @@ void DeviceMemoryManager::Map(DAddr address, VAddr virtual_address, size template void DeviceMemoryManager::Unmap(DAddr address, size_t size) { - size_t start_page_d = address >> Memory::YUZU_PAGEBITS; - size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS; + size_t start_page_d = address >> Memory::CITRON_PAGEBITS; + size_t num_pages = Common::AlignUp(size, Memory::CITRON_PAGESIZE) >> Memory::CITRON_PAGEBITS; device_inter->InvalidateRegion(address, size); std::scoped_lock lk(mapping_guard); for (size_t i = 0; i < num_pages; i++) { @@ -278,13 +278,13 @@ template void DeviceMemoryManager::TrackContinuityImpl(DAddr address, VAddr virtual_address, size_t size, Asid asid) { Core::Memory::Memory* process_memory = registered_processes[asid.id]; - size_t start_page_d = address >> Memory::YUZU_PAGEBITS; - size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS; + size_t start_page_d = address >> Memory::CITRON_PAGEBITS; + size_t num_pages = Common::AlignUp(size, Memory::CITRON_PAGESIZE) >> Memory::CITRON_PAGEBITS; uintptr_t last_ptr = 0; size_t page_count = 1; for (size_t i = num_pages; i > 0; i--) { size_t index = i - 1; - const VAddr new_vaddress = virtual_address + index * Memory::YUZU_PAGESIZE; + const VAddr new_vaddress = virtual_address + index * Memory::CITRON_PAGESIZE; const uintptr_t new_ptr = reinterpret_cast( process_memory->GetPointerSilent(Common::ProcessAddress(new_vaddress))); if (new_ptr + page_size == last_ptr) { @@ -333,26 +333,26 @@ void DeviceMemoryManager::InnerGatherDeviceAddresses(Common::ScratchBuff template template T* DeviceMemoryManager::GetPointer(DAddr address) { - const size_t index = address >> Memory::YUZU_PAGEBITS; - const size_t offset = address & Memory::YUZU_PAGEMASK; + const size_t index = address >> Memory::CITRON_PAGEBITS; + const size_t offset = address & Memory::CITRON_PAGEMASK; auto phys_addr = compressed_physical_ptr[index]; if (phys_addr == 0) [[unlikely]] { return nullptr; } - return GetPointerFromRaw((static_cast(phys_addr - 1) << Memory::YUZU_PAGEBITS) + + return GetPointerFromRaw((static_cast(phys_addr - 1) << Memory::CITRON_PAGEBITS) + offset); } template template const T* DeviceMemoryManager::GetPointer(DAddr address) const { - const size_t index = address >> Memory::YUZU_PAGEBITS; - const size_t offset = address & Memory::YUZU_PAGEMASK; + const size_t index = address >> Memory::CITRON_PAGEBITS; + const size_t offset = address & Memory::CITRON_PAGEMASK; auto phys_addr = compressed_physical_ptr[index]; if (phys_addr == 0) [[unlikely]] { return nullptr; } - return GetPointerFromRaw((static_cast(phys_addr - 1) << Memory::YUZU_PAGEBITS) + + return GetPointerFromRaw((static_cast(phys_addr - 1) << Memory::CITRON_PAGEBITS) + offset); } @@ -382,15 +382,15 @@ template void DeviceMemoryManager::WalkBlock(DAddr addr, std::size_t size, auto on_unmapped, auto on_memory, auto increment) { std::size_t remaining_size = size; - std::size_t page_index = addr >> Memory::YUZU_PAGEBITS; - std::size_t page_offset = addr & Memory::YUZU_PAGEMASK; + std::size_t page_index = addr >> Memory::CITRON_PAGEBITS; + std::size_t page_offset = addr & Memory::CITRON_PAGEMASK; while (remaining_size) { const size_t next_pages = static_cast(continuity_tracker[page_index]); const std::size_t copy_amount = - std::min((next_pages << Memory::YUZU_PAGEBITS) - page_offset, remaining_size); + std::min((next_pages << Memory::CITRON_PAGEBITS) - page_offset, remaining_size); const auto current_vaddr = - static_cast((page_index << Memory::YUZU_PAGEBITS) + page_offset); + static_cast((page_index << Memory::CITRON_PAGEBITS) + page_offset); SCOPE_EXIT{ page_index += next_pages; page_offset = 0; @@ -404,7 +404,7 @@ void DeviceMemoryManager::WalkBlock(DAddr addr, std::size_t size, auto o continue; } auto* mem_ptr = GetPointerFromRaw( - (static_cast(phys_addr - 1) << Memory::YUZU_PAGEBITS) + page_offset); + (static_cast(phys_addr - 1) << Memory::CITRON_PAGEBITS) + page_offset); on_memory(copy_amount, mem_ptr); } } @@ -516,31 +516,31 @@ void DeviceMemoryManager::UpdatePagesCachedCount(DAddr addr, size_t size const auto MarkRegionCaching = &DeviceMemoryManager::DeviceMethods::MarkRegionCaching; std::atomic_thread_fence(std::memory_order_acquire); - const size_t page_end = Common::DivCeil(addr + size, Memory::YUZU_PAGESIZE); - size_t page = addr >> Memory::YUZU_PAGEBITS; + const size_t page_end = Common::DivCeil(addr + size, Memory::CITRON_PAGESIZE); + size_t page = addr >> Memory::CITRON_PAGEBITS; auto [asid, base_vaddress] = ExtractCPUBacking(page); auto* memory_device_inter = registered_processes[asid.id]; const auto release_pending = [&] { if (uncache_bytes > 0) { if (memory_device_inter != nullptr) { - MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS, + MarkRegionCaching(memory_device_inter, uncache_begin << Memory::CITRON_PAGEBITS, uncache_bytes, false); } uncache_bytes = 0; } if (cache_bytes > 0) { if (memory_device_inter != nullptr) { - MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS, + MarkRegionCaching(memory_device_inter, cache_begin << Memory::CITRON_PAGEBITS, cache_bytes, true); } cache_bytes = 0; } }; - size_t old_vpage = (base_vaddress >> Memory::YUZU_PAGEBITS) - 1; + size_t old_vpage = (base_vaddress >> Memory::CITRON_PAGEBITS) - 1; for (; page != page_end; ++page) { CounterAtomicType& count = cached_pages->at(page >> subentries_shift).Count(page); auto [asid_2, vpage] = ExtractCPUBacking(page); - vpage >>= Memory::YUZU_PAGEBITS; + vpage >>= Memory::CITRON_PAGEBITS; if (vpage == 0) [[unlikely]] { release_pending(); @@ -566,9 +566,9 @@ void DeviceMemoryManager::UpdatePagesCachedCount(DAddr addr, size_t size if (uncache_bytes == 0) { uncache_begin = vpage; } - uncache_bytes += Memory::YUZU_PAGESIZE; + uncache_bytes += Memory::CITRON_PAGESIZE; } else if (uncache_bytes > 0) { - MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS, + MarkRegionCaching(memory_device_inter, uncache_begin << Memory::CITRON_PAGEBITS, uncache_bytes, false); uncache_bytes = 0; } @@ -576,9 +576,9 @@ void DeviceMemoryManager::UpdatePagesCachedCount(DAddr addr, size_t size if (cache_bytes == 0) { cache_begin = vpage; } - cache_bytes += Memory::YUZU_PAGESIZE; + cache_bytes += Memory::CITRON_PAGESIZE; } else if (cache_bytes > 0) { - MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS, + MarkRegionCaching(memory_device_inter, cache_begin << Memory::CITRON_PAGEBITS, cache_bytes, true); cache_bytes = 0; } diff --git a/src/core/file_sys/fs_path.h b/src/core/file_sys/fs_path.h index 1566e82b9..dd0c11f3c 100644 --- a/src/core/file_sys/fs_path.h +++ b/src/core/file_sys/fs_path.h @@ -15,8 +15,8 @@ namespace FileSys { class DirectoryPathParser; class Path { - YUZU_NON_COPYABLE(Path); - YUZU_NON_MOVEABLE(Path); + CITRON_NON_COPYABLE(Path); + CITRON_NON_MOVEABLE(Path); private: static constexpr const char* EmptyPath = ""; @@ -27,7 +27,7 @@ private: public: class WriteBuffer { - YUZU_NON_COPYABLE(WriteBuffer); + CITRON_NON_COPYABLE(WriteBuffer); private: char* m_buffer; diff --git a/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h b/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h index d0e9ceed0..ac92cf80f 100644 --- a/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h +++ b/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h @@ -14,8 +14,8 @@ namespace FileSys { using namespace Common::Literals; class AesCtrCounterExtendedStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(AesCtrCounterExtendedStorage); - YUZU_NON_MOVEABLE(AesCtrCounterExtendedStorage); + CITRON_NON_COPYABLE(AesCtrCounterExtendedStorage); + CITRON_NON_MOVEABLE(AesCtrCounterExtendedStorage); public: static constexpr size_t BlockSize = 0x10; diff --git a/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h b/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h index 5abd93d33..96a8089d3 100644 --- a/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h +++ b/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h @@ -14,8 +14,8 @@ namespace FileSys { class AesCtrStorage : public IStorage { - YUZU_NON_COPYABLE(AesCtrStorage); - YUZU_NON_MOVEABLE(AesCtrStorage); + CITRON_NON_COPYABLE(AesCtrStorage); + CITRON_NON_MOVEABLE(AesCtrStorage); public: static constexpr size_t BlockSize = 0x10; diff --git a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h index 0e83ca1b9..627a0452b 100644 --- a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h +++ b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h @@ -13,8 +13,8 @@ namespace FileSys { class AesXtsStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(AesXtsStorage); - YUZU_NON_MOVEABLE(AesXtsStorage); + CITRON_NON_COPYABLE(AesXtsStorage); + CITRON_NON_MOVEABLE(AesXtsStorage); public: static constexpr size_t AesBlockSize = 0x10; diff --git a/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h b/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h index f96691d03..645a50be6 100644 --- a/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h +++ b/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h @@ -13,8 +13,8 @@ namespace FileSys { template class AlignmentMatchingStorage : public IStorage { - YUZU_NON_COPYABLE(AlignmentMatchingStorage); - YUZU_NON_MOVEABLE(AlignmentMatchingStorage); + CITRON_NON_COPYABLE(AlignmentMatchingStorage); + CITRON_NON_MOVEABLE(AlignmentMatchingStorage); public: static constexpr size_t DataAlign = DataAlign_; @@ -77,8 +77,8 @@ public: template class AlignmentMatchingStoragePooledBuffer : public IStorage { - YUZU_NON_COPYABLE(AlignmentMatchingStoragePooledBuffer); - YUZU_NON_MOVEABLE(AlignmentMatchingStoragePooledBuffer); + CITRON_NON_COPYABLE(AlignmentMatchingStoragePooledBuffer); + CITRON_NON_MOVEABLE(AlignmentMatchingStoragePooledBuffer); public: static constexpr size_t BufferAlign = BufferAlign_; diff --git a/src/core/file_sys/fssystem/fssystem_bucket_tree.h b/src/core/file_sys/fssystem/fssystem_bucket_tree.h index 3a5e21d1a..21d8eac69 100644 --- a/src/core/file_sys/fssystem/fssystem_bucket_tree.h +++ b/src/core/file_sys/fssystem/fssystem_bucket_tree.h @@ -18,8 +18,8 @@ namespace FileSys { using namespace Common::Literals; class BucketTree { - YUZU_NON_COPYABLE(BucketTree); - YUZU_NON_MOVEABLE(BucketTree); + CITRON_NON_COPYABLE(BucketTree); + CITRON_NON_MOVEABLE(BucketTree); public: static constexpr u32 Magic = Common::MakeMagic('B', 'K', 'T', 'R'); @@ -123,7 +123,7 @@ public: private: class NodeBuffer { - YUZU_NON_COPYABLE(NodeBuffer); + CITRON_NON_COPYABLE(NodeBuffer); public: NodeBuffer() : m_header() {} @@ -330,8 +330,8 @@ private: }; class BucketTree::Visitor { - YUZU_NON_COPYABLE(Visitor); - YUZU_NON_MOVEABLE(Visitor); + CITRON_NON_COPYABLE(Visitor); + CITRON_NON_MOVEABLE(Visitor); public: constexpr Visitor() diff --git a/src/core/file_sys/fssystem/fssystem_compressed_storage.h b/src/core/file_sys/fssystem/fssystem_compressed_storage.h index 74c98630e..90e997249 100644 --- a/src/core/file_sys/fssystem/fssystem_compressed_storage.h +++ b/src/core/file_sys/fssystem/fssystem_compressed_storage.h @@ -17,8 +17,8 @@ namespace FileSys { using namespace Common::Literals; class CompressedStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(CompressedStorage); - YUZU_NON_MOVEABLE(CompressedStorage); + CITRON_NON_COPYABLE(CompressedStorage); + CITRON_NON_MOVEABLE(CompressedStorage); public: static constexpr size_t NodeSize = 16_KiB; @@ -47,8 +47,8 @@ public: private: class CompressedStorageCore { - YUZU_NON_COPYABLE(CompressedStorageCore); - YUZU_NON_MOVEABLE(CompressedStorageCore); + CITRON_NON_COPYABLE(CompressedStorageCore); + CITRON_NON_MOVEABLE(CompressedStorageCore); public: CompressedStorageCore() : m_table(), m_data_storage() {} @@ -674,8 +674,8 @@ private: }; class CacheManager { - YUZU_NON_COPYABLE(CacheManager); - YUZU_NON_MOVEABLE(CacheManager); + CITRON_NON_COPYABLE(CacheManager); + CITRON_NON_MOVEABLE(CacheManager); private: struct AccessRange { diff --git a/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h b/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h index bd129db47..e478134fe 100644 --- a/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h +++ b/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h @@ -57,8 +57,8 @@ struct HierarchicalIntegrityVerificationSizeSet { static_assert(std::is_trivial_v); class HierarchicalIntegrityVerificationStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(HierarchicalIntegrityVerificationStorage); - YUZU_NON_MOVEABLE(HierarchicalIntegrityVerificationStorage); + CITRON_NON_COPYABLE(HierarchicalIntegrityVerificationStorage); + CITRON_NON_MOVEABLE(HierarchicalIntegrityVerificationStorage); public: using GenerateRandomFunction = void (*)(void* dst, size_t size); diff --git a/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h b/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h index 41d3960b8..4332c8de6 100644 --- a/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h +++ b/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h @@ -12,8 +12,8 @@ namespace FileSys { class HierarchicalSha256Storage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(HierarchicalSha256Storage); - YUZU_NON_MOVEABLE(HierarchicalSha256Storage); + CITRON_NON_COPYABLE(HierarchicalSha256Storage); + CITRON_NON_MOVEABLE(HierarchicalSha256Storage); public: static constexpr s32 LayerCount = 3; diff --git a/src/core/file_sys/fssystem/fssystem_indirect_storage.h b/src/core/file_sys/fssystem/fssystem_indirect_storage.h index d4b95fd27..026bd2b65 100644 --- a/src/core/file_sys/fssystem/fssystem_indirect_storage.h +++ b/src/core/file_sys/fssystem/fssystem_indirect_storage.h @@ -13,8 +13,8 @@ namespace FileSys { class IndirectStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(IndirectStorage); - YUZU_NON_MOVEABLE(IndirectStorage); + CITRON_NON_COPYABLE(IndirectStorage); + CITRON_NON_MOVEABLE(IndirectStorage); public: static constexpr s32 StorageCount = 2; diff --git a/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h b/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h index 09f76799d..7a4041778 100644 --- a/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h +++ b/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h @@ -11,8 +11,8 @@ namespace FileSys { class IntegrityVerificationStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(IntegrityVerificationStorage); - YUZU_NON_MOVEABLE(IntegrityVerificationStorage); + CITRON_NON_COPYABLE(IntegrityVerificationStorage); + CITRON_NON_MOVEABLE(IntegrityVerificationStorage); public: static constexpr s64 HashSize = 256 / 8; diff --git a/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h b/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h index c07a127fb..6f13240bd 100644 --- a/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h +++ b/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h @@ -8,8 +8,8 @@ namespace FileSys { class MemoryResourceBufferHoldStorage : public IStorage { - YUZU_NON_COPYABLE(MemoryResourceBufferHoldStorage); - YUZU_NON_MOVEABLE(MemoryResourceBufferHoldStorage); + CITRON_NON_COPYABLE(MemoryResourceBufferHoldStorage); + CITRON_NON_MOVEABLE(MemoryResourceBufferHoldStorage); public: MemoryResourceBufferHoldStorage(VirtualFile storage, size_t buffer_size) diff --git a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp index ab5a7984e..0d2d607aa 100644 --- a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp +++ b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp @@ -28,8 +28,8 @@ constexpr inline s32 IntegrityDataCacheCountForMeta = 16; constexpr inline s32 IntegrityHashCacheCountForMeta = 2; class SharedNcaBodyStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(SharedNcaBodyStorage); - YUZU_NON_MOVEABLE(SharedNcaBodyStorage); + CITRON_NON_COPYABLE(SharedNcaBodyStorage); + CITRON_NON_MOVEABLE(SharedNcaBodyStorage); private: VirtualFile m_storage; diff --git a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h index 5bc838de6..989c3c099 100644 --- a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h +++ b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h @@ -88,8 +88,8 @@ constexpr inline s32 GetKeyTypeValue(u8 key_index, u8 key_generation) { } class NcaReader { - YUZU_NON_COPYABLE(NcaReader); - YUZU_NON_MOVEABLE(NcaReader); + CITRON_NON_COPYABLE(NcaReader); + CITRON_NON_MOVEABLE(NcaReader); public: NcaReader(); @@ -154,8 +154,8 @@ private: }; class NcaFsHeaderReader { - YUZU_NON_COPYABLE(NcaFsHeaderReader); - YUZU_NON_MOVEABLE(NcaFsHeaderReader); + CITRON_NON_COPYABLE(NcaFsHeaderReader); + CITRON_NON_MOVEABLE(NcaFsHeaderReader); public: NcaFsHeaderReader() : m_fs_index(-1) { @@ -207,8 +207,8 @@ private: }; class NcaFileSystemDriver { - YUZU_NON_COPYABLE(NcaFileSystemDriver); - YUZU_NON_MOVEABLE(NcaFileSystemDriver); + CITRON_NON_COPYABLE(NcaFileSystemDriver); + CITRON_NON_MOVEABLE(NcaFileSystemDriver); public: struct StorageContext { diff --git a/src/core/file_sys/fssystem/fssystem_pooled_buffer.h b/src/core/file_sys/fssystem/fssystem_pooled_buffer.h index 9a6adbcb5..48c19ad64 100644 --- a/src/core/file_sys/fssystem/fssystem_pooled_buffer.h +++ b/src/core/file_sys/fssystem/fssystem_pooled_buffer.h @@ -16,7 +16,7 @@ constexpr inline size_t BufferPoolAlignment = 4_KiB; constexpr inline size_t BufferPoolWorkSize = 320; class PooledBuffer { - YUZU_NON_COPYABLE(PooledBuffer); + CITRON_NON_COPYABLE(PooledBuffer); public: // Constructor/Destructor. diff --git a/src/core/file_sys/fssystem/fssystem_sparse_storage.h b/src/core/file_sys/fssystem/fssystem_sparse_storage.h index 6c196ec61..b669cb84b 100644 --- a/src/core/file_sys/fssystem/fssystem_sparse_storage.h +++ b/src/core/file_sys/fssystem/fssystem_sparse_storage.h @@ -8,8 +8,8 @@ namespace FileSys { class SparseStorage : public IndirectStorage { - YUZU_NON_COPYABLE(SparseStorage); - YUZU_NON_MOVEABLE(SparseStorage); + CITRON_NON_COPYABLE(SparseStorage); + CITRON_NON_MOVEABLE(SparseStorage); private: class ZeroStorage : public IReadOnlyStorage { diff --git a/src/core/file_sys/fssystem/fssystem_switch_storage.h b/src/core/file_sys/fssystem/fssystem_switch_storage.h index 2b43927cb..5cddb0630 100644 --- a/src/core/file_sys/fssystem/fssystem_switch_storage.h +++ b/src/core/file_sys/fssystem/fssystem_switch_storage.h @@ -8,8 +8,8 @@ namespace FileSys { class RegionSwitchStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(RegionSwitchStorage); - YUZU_NON_MOVEABLE(RegionSwitchStorage); + CITRON_NON_COPYABLE(RegionSwitchStorage); + CITRON_NON_MOVEABLE(RegionSwitchStorage); public: struct Region { diff --git a/src/core/file_sys/vfs/vfs.h b/src/core/file_sys/vfs/vfs.h index f846a9669..555d7fff5 100644 --- a/src/core/file_sys/vfs/vfs.h +++ b/src/core/file_sys/vfs/vfs.h @@ -30,8 +30,8 @@ enum class VfsEntryType { // functionality, they will need to override. class VfsFilesystem { public: - YUZU_NON_COPYABLE(VfsFilesystem); - YUZU_NON_MOVEABLE(VfsFilesystem); + CITRON_NON_COPYABLE(VfsFilesystem); + CITRON_NON_MOVEABLE(VfsFilesystem); explicit VfsFilesystem(VirtualDir root); virtual ~VfsFilesystem(); @@ -81,8 +81,8 @@ protected: // A class representing a file in an abstract filesystem. class VfsFile { public: - YUZU_NON_COPYABLE(VfsFile); - YUZU_NON_MOVEABLE(VfsFile); + CITRON_NON_COPYABLE(VfsFile); + CITRON_NON_MOVEABLE(VfsFile); VfsFile() = default; virtual ~VfsFile(); @@ -184,8 +184,8 @@ public: // A class representing a directory in an abstract filesystem. class VfsDirectory { public: - YUZU_NON_COPYABLE(VfsDirectory); - YUZU_NON_MOVEABLE(VfsDirectory); + CITRON_NON_COPYABLE(VfsDirectory); + CITRON_NON_MOVEABLE(VfsDirectory); VfsDirectory() = default; virtual ~VfsDirectory(); diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index 8d4e0df44..a6751b0f6 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h @@ -27,8 +27,8 @@ private: static constexpr inline ClassTokenType ClassToken() { return ::Kernel::ClassToken; } \ \ public: \ - YUZU_NON_COPYABLE(CLASS); \ - YUZU_NON_MOVEABLE(CLASS); \ + CITRON_NON_COPYABLE(CLASS); \ + CITRON_NON_MOVEABLE(CLASS); \ \ using BaseClass = BASE_CLASS; \ static constexpr TypeObj GetStaticTypeObj() { \ @@ -211,7 +211,7 @@ private: template class KScopedAutoObject { public: - YUZU_NON_COPYABLE(KScopedAutoObject); + CITRON_NON_COPYABLE(KScopedAutoObject); constexpr KScopedAutoObject() = default; diff --git a/src/core/hle/kernel/k_auto_object_container.h b/src/core/hle/kernel/k_auto_object_container.h index 770743d21..004f7a60c 100644 --- a/src/core/hle/kernel/k_auto_object_container.h +++ b/src/core/hle/kernel/k_auto_object_container.h @@ -16,8 +16,8 @@ class KProcess; class KAutoObjectWithListContainer { public: - YUZU_NON_COPYABLE(KAutoObjectWithListContainer); - YUZU_NON_MOVEABLE(KAutoObjectWithListContainer); + CITRON_NON_COPYABLE(KAutoObjectWithListContainer); + CITRON_NON_MOVEABLE(KAutoObjectWithListContainer); using ListType = boost::intrusive::rbtree; diff --git a/src/core/hle/kernel/k_dynamic_resource_manager.h b/src/core/hle/kernel/k_dynamic_resource_manager.h index b6a27d648..bc4ea459e 100644 --- a/src/core/hle/kernel/k_dynamic_resource_manager.h +++ b/src/core/hle/kernel/k_dynamic_resource_manager.h @@ -12,8 +12,8 @@ namespace Kernel { template class KDynamicResourceManager { - YUZU_NON_COPYABLE(KDynamicResourceManager); - YUZU_NON_MOVEABLE(KDynamicResourceManager); + CITRON_NON_COPYABLE(KDynamicResourceManager); + CITRON_NON_MOVEABLE(KDynamicResourceManager); public: using DynamicSlabType = KDynamicSlabHeap; diff --git a/src/core/hle/kernel/k_dynamic_slab_heap.h b/src/core/hle/kernel/k_dynamic_slab_heap.h index 76ed4cac1..90c4ac210 100644 --- a/src/core/hle/kernel/k_dynamic_slab_heap.h +++ b/src/core/hle/kernel/k_dynamic_slab_heap.h @@ -13,8 +13,8 @@ namespace Kernel { template class KDynamicSlabHeap : protected impl::KSlabHeapImpl { - YUZU_NON_COPYABLE(KDynamicSlabHeap); - YUZU_NON_MOVEABLE(KDynamicSlabHeap); + CITRON_NON_COPYABLE(KDynamicSlabHeap); + CITRON_NON_MOVEABLE(KDynamicSlabHeap); public: constexpr KDynamicSlabHeap() = default; diff --git a/src/core/hle/kernel/k_handle_table.h b/src/core/hle/kernel/k_handle_table.h index 1bf68e6b0..9f529a948 100644 --- a/src/core/hle/kernel/k_handle_table.h +++ b/src/core/hle/kernel/k_handle_table.h @@ -21,8 +21,8 @@ namespace Kernel { class KernelCore; class KHandleTable { - YUZU_NON_COPYABLE(KHandleTable); - YUZU_NON_MOVEABLE(KHandleTable); + CITRON_NON_COPYABLE(KHandleTable); + CITRON_NON_MOVEABLE(KHandleTable); public: static constexpr size_t MaxTableSize = 1024; diff --git a/src/core/hle/kernel/k_memory_region.h b/src/core/hle/kernel/k_memory_region.h index e3044f022..f1fbd5177 100644 --- a/src/core/hle/kernel/k_memory_region.h +++ b/src/core/hle/kernel/k_memory_region.h @@ -17,8 +17,8 @@ class KMemoryRegion final : public Common::IntrusiveRedBlackTreeBaseNode::TreeType; public: - YUZU_NON_COPYABLE(KMemoryRegionTree); - YUZU_NON_MOVEABLE(KMemoryRegionTree); + CITRON_NON_COPYABLE(KMemoryRegionTree); + CITRON_NON_MOVEABLE(KMemoryRegionTree); using value_type = TreeType::value_type; using size_type = TreeType::size_type; @@ -327,8 +327,8 @@ private: class KMemoryRegionAllocator final { public: - YUZU_NON_COPYABLE(KMemoryRegionAllocator); - YUZU_NON_MOVEABLE(KMemoryRegionAllocator); + CITRON_NON_COPYABLE(KMemoryRegionAllocator); + CITRON_NON_MOVEABLE(KMemoryRegionAllocator); static constexpr size_t MaxMemoryRegions = 200; diff --git a/src/core/hle/kernel/k_page_table_base.cpp b/src/core/hle/kernel/k_page_table_base.cpp index 19cdf4f3a..5e00f0c81 100644 --- a/src/core/hle/kernel/k_page_table_base.cpp +++ b/src/core/hle/kernel/k_page_table_base.cpp @@ -14,8 +14,8 @@ namespace Kernel { namespace { class KScopedLightLockPair { - YUZU_NON_COPYABLE(KScopedLightLockPair); - YUZU_NON_MOVEABLE(KScopedLightLockPair); + CITRON_NON_COPYABLE(KScopedLightLockPair); + CITRON_NON_MOVEABLE(KScopedLightLockPair); private: KLightLock* m_lower; diff --git a/src/core/hle/kernel/k_page_table_base.h b/src/core/hle/kernel/k_page_table_base.h index 748419f86..939b8a7ae 100644 --- a/src/core/hle/kernel/k_page_table_base.h +++ b/src/core/hle/kernel/k_page_table_base.h @@ -49,8 +49,8 @@ class KResourceLimit; class KSystemResource; class KPageTableBase { - YUZU_NON_COPYABLE(KPageTableBase); - YUZU_NON_MOVEABLE(KPageTableBase); + CITRON_NON_COPYABLE(KPageTableBase); + CITRON_NON_MOVEABLE(KPageTableBase); public: using TraversalEntry = Common::PageTable::TraversalEntry; diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h index d85a0c040..0148fdc2b 100644 --- a/src/core/hle/kernel/k_scheduler.h +++ b/src/core/hle/kernel/k_scheduler.h @@ -33,8 +33,8 @@ class KScopedSchedulerLockAndSleep; class KScheduler final { public: - YUZU_NON_COPYABLE(KScheduler); - YUZU_NON_MOVEABLE(KScheduler); + CITRON_NON_COPYABLE(KScheduler); + CITRON_NON_MOVEABLE(KScheduler); using LockType = KAbstractSchedulerLock; diff --git a/src/core/hle/kernel/k_slab_heap.h b/src/core/hle/kernel/k_slab_heap.h index 334afebb7..fa1771762 100644 --- a/src/core/hle/kernel/k_slab_heap.h +++ b/src/core/hle/kernel/k_slab_heap.h @@ -18,8 +18,8 @@ class KernelCore; namespace impl { class KSlabHeapImpl { - YUZU_NON_COPYABLE(KSlabHeapImpl); - YUZU_NON_MOVEABLE(KSlabHeapImpl); + CITRON_NON_COPYABLE(KSlabHeapImpl); + CITRON_NON_MOVEABLE(KSlabHeapImpl); public: struct Node { @@ -72,8 +72,8 @@ private: template class KSlabHeapBase : protected impl::KSlabHeapImpl { - YUZU_NON_COPYABLE(KSlabHeapBase); - YUZU_NON_MOVEABLE(KSlabHeapBase); + CITRON_NON_COPYABLE(KSlabHeapBase); + CITRON_NON_MOVEABLE(KSlabHeapBase); private: size_t m_obj_size{}; diff --git a/src/core/hle/kernel/k_spin_lock.h b/src/core/hle/kernel/k_spin_lock.h index 094a1e6be..480435bf3 100644 --- a/src/core/hle/kernel/k_spin_lock.h +++ b/src/core/hle/kernel/k_spin_lock.h @@ -14,8 +14,8 @@ class KSpinLock { public: explicit KSpinLock() = default; - YUZU_NON_COPYABLE(KSpinLock); - YUZU_NON_MOVEABLE(KSpinLock); + CITRON_NON_COPYABLE(KSpinLock); + CITRON_NON_MOVEABLE(KSpinLock); void Lock(); void Unlock(); diff --git a/src/core/hle/kernel/physical_core.h b/src/core/hle/kernel/physical_core.h index bae4fe5b8..3a41cfc82 100644 --- a/src/core/hle/kernel/physical_core.h +++ b/src/core/hle/kernel/physical_core.h @@ -26,8 +26,8 @@ public: PhysicalCore(KernelCore& kernel, std::size_t core_index); ~PhysicalCore(); - YUZU_NON_COPYABLE(PhysicalCore); - YUZU_NON_MOVEABLE(PhysicalCore); + CITRON_NON_COPYABLE(PhysicalCore); + CITRON_NON_MOVEABLE(PhysicalCore); // Execute guest code running on the given thread. void RunThread(KThread* thread); diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 316370266..b0a32d74b 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -298,8 +298,8 @@ private: namespace ResultImpl { template class ScopedResultGuard { - YUZU_NON_COPYABLE(ScopedResultGuard); - YUZU_NON_MOVEABLE(ScopedResultGuard); + CITRON_NON_COPYABLE(ScopedResultGuard); + CITRON_NON_MOVEABLE(ScopedResultGuard); private: Result& m_ref; diff --git a/src/core/hle/service/jit/jit_code_memory.h b/src/core/hle/service/jit/jit_code_memory.h index 6376d4c4e..dcb9668bc 100644 --- a/src/core/hle/service/jit/jit_code_memory.h +++ b/src/core/hle/service/jit/jit_code_memory.h @@ -11,7 +11,7 @@ namespace Service::JIT { class CodeMemory { public: - YUZU_NON_COPYABLE(CodeMemory); + CITRON_NON_COPYABLE(CodeMemory); explicit CodeMemory() = default; diff --git a/src/core/hle/service/nvdrv/core/nvmap.cpp b/src/core/hle/service/nvdrv/core/nvmap.cpp index 453cb5831..0ef3dca24 100644 --- a/src/core/hle/service/nvdrv/core/nvmap.cpp +++ b/src/core/hle/service/nvdrv/core/nvmap.cpp @@ -13,8 +13,8 @@ #include "core/memory.h" #include "video_core/host1x/host1x.h" -using Core::Memory::YUZU_PAGESIZE; -constexpr size_t BIG_PAGE_SIZE = YUZU_PAGESIZE * 16; +using Core::Memory::CITRON_PAGESIZE; +constexpr size_t BIG_PAGE_SIZE = CITRON_PAGESIZE * 16; namespace Service::Nvidia::NvCore { NvMap::Handle::Handle(u64 size_, Id id_) @@ -32,7 +32,7 @@ NvResult NvMap::Handle::Alloc(Flags pFlags, u32 pAlign, u8 pKind, u64 pAddress, flags = pFlags; kind = pKind; - align = pAlign < YUZU_PAGESIZE ? YUZU_PAGESIZE : pAlign; + align = pAlign < CITRON_PAGESIZE ? CITRON_PAGESIZE : pAlign; session_id = pSessionId; // This flag is only applicable for handles with an address passed @@ -43,7 +43,7 @@ NvResult NvMap::Handle::Alloc(Flags pFlags, u32 pAlign, u8 pKind, u64 pAddress, "Mapping nvmap handles without a CPU side address is unimplemented!"); } - size = Common::AlignUp(size, YUZU_PAGESIZE); + size = Common::AlignUp(size, CITRON_PAGESIZE); aligned_size = Common::AlignUp(size, align); address = pAddress; allocated = true; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 68fe38874..18de13eff 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp @@ -152,7 +152,7 @@ NvResult nvhost_as_gpu::AllocateSpace(IoctlAllocSpace& params) { return NvResult::BadValue; } - if (params.page_size != VM::YUZU_PAGESIZE && params.page_size != vm.big_page_size) { + if (params.page_size != VM::CITRON_PAGESIZE && params.page_size != vm.big_page_size) { return NvResult::BadValue; } @@ -162,10 +162,10 @@ NvResult nvhost_as_gpu::AllocateSpace(IoctlAllocSpace& params) { return NvResult::NotImplemented; } - const u32 page_size_bits{params.page_size == VM::YUZU_PAGESIZE ? VM::PAGE_SIZE_BITS + const u32 page_size_bits{params.page_size == VM::CITRON_PAGESIZE ? VM::PAGE_SIZE_BITS : vm.big_page_size_bits}; - auto& allocator{params.page_size == VM::YUZU_PAGESIZE ? *vm.small_page_allocator + auto& allocator{params.page_size == VM::CITRON_PAGESIZE ? *vm.small_page_allocator : *vm.big_page_allocator}; if ((params.flags & MappingFlags::Fixed) != MappingFlags::None) { @@ -189,7 +189,7 @@ NvResult nvhost_as_gpu::AllocateSpace(IoctlAllocSpace& params) { .mappings{}, .page_size = params.page_size, .sparse = (params.flags & MappingFlags::Sparse) != MappingFlags::None, - .big_pages = params.page_size != VM::YUZU_PAGESIZE, + .big_pages = params.page_size != VM::CITRON_PAGESIZE, }; return NvResult::Success; @@ -201,7 +201,7 @@ void nvhost_as_gpu::FreeMappingLocked(u64 offset) { if (!mapping->fixed) { auto& allocator{mapping->big_page ? *vm.big_page_allocator : *vm.small_page_allocator}; u32 page_size_bits{mapping->big_page ? vm.big_page_size_bits : VM::PAGE_SIZE_BITS}; - u32 page_size{mapping->big_page ? vm.big_page_size : VM::YUZU_PAGESIZE}; + u32 page_size{mapping->big_page ? vm.big_page_size : VM::CITRON_PAGESIZE}; u64 aligned_size{Common::AlignUp(mapping->size, page_size)}; allocator.Free(static_cast(mapping->offset >> page_size_bits), @@ -248,9 +248,9 @@ NvResult nvhost_as_gpu::FreeSpace(IoctlFreeSpace& params) { gmmu->Unmap(params.offset, allocation.size); } - auto& allocator{params.page_size == VM::YUZU_PAGESIZE ? *vm.small_page_allocator + auto& allocator{params.page_size == VM::CITRON_PAGESIZE ? *vm.small_page_allocator : *vm.big_page_allocator}; - u32 page_size_bits{params.page_size == VM::YUZU_PAGESIZE ? VM::PAGE_SIZE_BITS + u32 page_size_bits{params.page_size == VM::CITRON_PAGESIZE ? VM::PAGE_SIZE_BITS : vm.big_page_size_bits}; allocator.Free(static_cast(params.offset >> page_size_bits), @@ -360,7 +360,7 @@ NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) { bool big_page{[&]() { if (Common::IsAligned(handle->align, vm.big_page_size)) { return true; - } else if (Common::IsAligned(handle->align, VM::YUZU_PAGESIZE)) { + } else if (Common::IsAligned(handle->align, VM::CITRON_PAGESIZE)) { return false; } else { ASSERT(false); @@ -387,7 +387,7 @@ NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) { mapping_map[params.offset] = mapping; } else { auto& allocator{big_page ? *vm.big_page_allocator : *vm.small_page_allocator}; - u32 page_size{big_page ? vm.big_page_size : VM::YUZU_PAGESIZE}; + u32 page_size{big_page ? vm.big_page_size : VM::CITRON_PAGESIZE}; u32 page_size_bits{big_page ? vm.big_page_size_bits : VM::PAGE_SIZE_BITS}; params.offset = static_cast(allocator.Allocate( @@ -461,7 +461,7 @@ void nvhost_as_gpu::GetVARegionsImpl(IoctlGetVaRegions& params) { params.regions = std::array{ VaRegion{ .offset = vm.small_page_allocator->GetVAStart() << VM::PAGE_SIZE_BITS, - .page_size = VM::YUZU_PAGESIZE, + .page_size = VM::CITRON_PAGESIZE, ._pad0_{}, .pages = vm.small_page_allocator->GetVALimit() - vm.small_page_allocator->GetVAStart(), }, diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h index 7d0a99988..1b572fb6e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h @@ -190,8 +190,8 @@ private: std::mutex mutex; //!< Locks all AS operations struct VM { - static constexpr u32 YUZU_PAGESIZE{0x1000}; - static constexpr u32 PAGE_SIZE_BITS{std::countr_zero(YUZU_PAGESIZE)}; + static constexpr u32 CITRON_PAGESIZE{0x1000}; + static constexpr u32 PAGE_SIZE_BITS{std::countr_zero(CITRON_PAGESIZE)}; static constexpr u32 SUPPORTED_BIG_PAGE_SIZES{0x30000}; static constexpr u32 DEFAULT_BIG_PAGE_SIZE{0x20000}; diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index da61a3bfe..1304db96a 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -17,7 +17,7 @@ #include "core/hle/service/nvdrv/devices/nvmap.h" #include "core/memory.h" -using Core::Memory::YUZU_PAGESIZE; +using Core::Memory::CITRON_PAGESIZE; namespace Service::Nvidia::Devices { @@ -82,7 +82,7 @@ NvResult nvmap::IocCreate(IocCreateParams& params) { std::shared_ptr handle_description{}; auto result = - file.CreateHandle(Common::AlignUp(params.size, YUZU_PAGESIZE), handle_description); + file.CreateHandle(Common::AlignUp(params.size, CITRON_PAGESIZE), handle_description); if (result != NvResult::Success) { LOG_CRITICAL(Service_NVDRV, "Failed to create Object"); return result; @@ -108,8 +108,8 @@ NvResult nvmap::IocAlloc(IocAllocParams& params, DeviceFD fd) { } // Force page size alignment at a minimum - if (params.align < YUZU_PAGESIZE) { - params.align = YUZU_PAGESIZE; + if (params.align < CITRON_PAGESIZE) { + params.align = CITRON_PAGESIZE; } auto handle_description{file.GetHandle(params.handle)}; diff --git a/src/core/hle/service/ro/ro.cpp b/src/core/hle/service/ro/ro.cpp index 3d3ad2d62..0d325e794 100644 --- a/src/core/hle/service/ro/ro.cpp +++ b/src/core/hle/service/ro/ro.cpp @@ -228,10 +228,10 @@ struct ProcessContext { R_UNLESS(bss_size == expected_bss_size, RO::ResultInvalidNro); // Validate all sizes are aligned. - R_UNLESS(Common::IsAligned(text_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro); - R_UNLESS(Common::IsAligned(ro_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro); - R_UNLESS(Common::IsAligned(rw_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro); - R_UNLESS(Common::IsAligned(bss_size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidNro); + R_UNLESS(Common::IsAligned(text_size, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidNro); + R_UNLESS(Common::IsAligned(ro_size, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidNro); + R_UNLESS(Common::IsAligned(rw_size, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidNro); + R_UNLESS(Common::IsAligned(bss_size, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidNro); // Validate sections are in order. R_UNLESS(text_ofs <= ro_ofs, RO::ResultInvalidNro); @@ -286,16 +286,16 @@ private: }; Result ValidateAddressAndNonZeroSize(u64 address, u64 size) { - R_UNLESS(Common::IsAligned(address, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidAddress); + R_UNLESS(Common::IsAligned(address, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidAddress); R_UNLESS(size != 0, RO::ResultInvalidSize); - R_UNLESS(Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidSize); + R_UNLESS(Common::IsAligned(size, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidSize); R_UNLESS(address < address + size, RO::ResultInvalidSize); R_SUCCEED(); } Result ValidateAddressAndSize(u64 address, u64 size) { - R_UNLESS(Common::IsAligned(address, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidAddress); - R_UNLESS(Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE), RO::ResultInvalidSize); + R_UNLESS(Common::IsAligned(address, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidAddress); + R_UNLESS(Common::IsAligned(size, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidSize); R_UNLESS(size == 0 || address < address + size, RO::ResultInvalidSize); R_SUCCEED(); } @@ -369,7 +369,7 @@ public: ASSERT(context != nullptr); // Validate address. - R_UNLESS(Common::IsAligned(nrr_address, Core::Memory::YUZU_PAGESIZE), + R_UNLESS(Common::IsAligned(nrr_address, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidAddress); // Check the NRR is loaded. @@ -436,7 +436,7 @@ public: ASSERT(context != nullptr); // Validate address. - R_UNLESS(Common::IsAligned(nro_address, Core::Memory::YUZU_PAGESIZE), + R_UNLESS(Common::IsAligned(nro_address, Core::Memory::CITRON_PAGESIZE), RO::ResultInvalidAddress); // Check the NRO is loaded. diff --git a/src/core/hle/service/set/system_settings_server.cpp b/src/core/hle/service/set/system_settings_server.cpp index bf8dcacfe..5c2a36f00 100644 --- a/src/core/hle/service/set/system_settings_server.cpp +++ b/src/core/hle/service/set/system_settings_server.cpp @@ -932,7 +932,7 @@ Result ISystemSettingsServer::SetPrimaryAlbumStorage(PrimaryAlbumStorage primary Result ISystemSettingsServer::GetBatteryLot(Out out_battery_lot) { LOG_INFO(Service_SET, "called"); - *out_battery_lot = {"YUZU0EMULATOR14022024"}; + *out_battery_lot = {"CITRON0EMULATOR14022024"}; R_SUCCEED(); } diff --git a/src/core/hle/service/ssl/ssl_backend_securetransport.cpp b/src/core/hle/service/ssl/ssl_backend_securetransport.cpp index c48914f64..297203184 100644 --- a/src/core/hle/service/ssl/ssl_backend_securetransport.cpp +++ b/src/core/hle/service/ssl/ssl_backend_securetransport.cpp @@ -23,7 +23,7 @@ template struct CFReleaser { T ptr; - YUZU_NON_COPYABLE(CFReleaser); + CITRON_NON_COPYABLE(CFReleaser); constexpr CFReleaser() : ptr(nullptr) {} constexpr CFReleaser(T ptr) : ptr(ptr) {} constexpr operator T() { diff --git a/src/core/hle/service/vi/shared_buffer_manager.cpp b/src/core/hle/service/vi/shared_buffer_manager.cpp index 12cba16fa..99242994e 100644 --- a/src/core/hle/service/vi/shared_buffer_manager.cpp +++ b/src/core/hle/service/vi/shared_buffer_manager.cpp @@ -23,7 +23,7 @@ namespace { Result AllocateSharedBufferMemory(std::unique_ptr* out_page_group, Core::System& system, u32 size) { - using Core::Memory::YUZU_PAGESIZE; + using Core::Memory::CITRON_PAGESIZE; // Allocate memory for the system shared buffer. auto& kernel = system.Kernel(); @@ -34,7 +34,7 @@ Result AllocateSharedBufferMemory(std::unique_ptr* out_page_ // Allocate memory from secure pool. R_TRY(kernel.MemoryManager().AllocateAndOpen( - pg.get(), size / YUZU_PAGESIZE, + pg.get(), size / CITRON_PAGESIZE, Kernel::KMemoryManager::EncodeOption(Kernel::KMemoryManager::Pool::Secure, Kernel::KMemoryManager::Direction::FromBack))); @@ -58,13 +58,13 @@ Result AllocateSharedBufferMemory(std::unique_ptr* out_page_ Result MapSharedBufferIntoProcessAddressSpace(Common::ProcessAddress* out_map_address, std::unique_ptr& pg, Kernel::KProcess* process, Core::System& system) { - using Core::Memory::YUZU_PAGESIZE; + using Core::Memory::CITRON_PAGESIZE; auto& page_table = process->GetPageTable(); // Get bounds of where mapping is possible. const VAddr alias_code_begin = GetInteger(page_table.GetAliasCodeRegionStart()); - const VAddr alias_code_size = page_table.GetAliasCodeRegionSize() / YUZU_PAGESIZE; + const VAddr alias_code_size = page_table.GetAliasCodeRegionSize() / CITRON_PAGESIZE; const auto state = Kernel::KMemoryState::IoMemory; const auto perm = Kernel::KMemoryPermission::UserReadWrite; std::mt19937_64 rng{process->GetRandomEntropy(0)}; @@ -73,7 +73,7 @@ Result MapSharedBufferIntoProcessAddressSpace(Common::ProcessAddress* out_map_ad Result res = ResultSuccess; int i; for (i = 0; i < 64; i++) { - *out_map_address = alias_code_begin + ((rng() % alias_code_size) * YUZU_PAGESIZE); + *out_map_address = alias_code_begin + ((rng() % alias_code_size) * CITRON_PAGESIZE); res = page_table.MapPageGroup(*out_map_address, *pg, state, perm); if (R_SUCCEEDED(res)) { break; diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 7785c1d16..df6d3cc65 100644 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp @@ -12,7 +12,7 @@ #ifdef _WIN32 #include #include -#elif YUZU_UNIX +#elif CITRON_UNIX #include #include #include @@ -77,7 +77,7 @@ SOCKET GetInterruptSocket() { sockaddr TranslateFromSockAddrIn(SockAddrIn input) { sockaddr_in result; -#if YUZU_UNIX +#if CITRON_UNIX result.sin_len = sizeof(result); #endif @@ -162,7 +162,7 @@ Errno TranslateNativeError(int e, CallType call_type = CallType::Other) { } } -#elif YUZU_UNIX // ^ _WIN32 v YUZU_UNIX +#elif CITRON_UNIX // ^ _WIN32 v CITRON_UNIX using SOCKET = int; using WSAPOLLFD = pollfd; @@ -835,7 +835,7 @@ std::pair Socket::Send(std::span message, int flags) { ASSERT(flags == 0); int native_flags = 0; -#if YUZU_UNIX +#if CITRON_UNIX native_flags |= MSG_NOSIGNAL; // do not send us SIGPIPE #endif const auto result = send(fd, reinterpret_cast(message.data()), diff --git a/src/core/internal_network/network.h b/src/core/internal_network/network.h index b7b7d773a..2e0f68c2e 100644 --- a/src/core/internal_network/network.h +++ b/src/core/internal_network/network.h @@ -13,7 +13,7 @@ #ifdef _WIN32 #include -#elif YUZU_UNIX +#elif CITRON_UNIX #include #endif @@ -104,7 +104,7 @@ constexpr IPv4Address TranslateIPv4(in_addr addr) { auto& bytes = addr.S_un.S_un_b; return IPv4Address{bytes.s_b1, bytes.s_b2, bytes.s_b3, bytes.s_b4}; } -#elif YUZU_UNIX +#elif CITRON_UNIX constexpr IPv4Address TranslateIPv4(in_addr addr) { const u32 bytes = addr.s_addr; return IPv4Address{static_cast(bytes), static_cast(bytes >> 8), diff --git a/src/core/internal_network/socket_proxy.cpp b/src/core/internal_network/socket_proxy.cpp index ce0dee970..a2972203f 100644 --- a/src/core/internal_network/socket_proxy.cpp +++ b/src/core/internal_network/socket_proxy.cpp @@ -12,7 +12,7 @@ #include "core/internal_network/socket_proxy.h" #include "network/network.h" -#if YUZU_UNIX +#if CITRON_UNIX #include #endif diff --git a/src/core/internal_network/sockets.h b/src/core/internal_network/sockets.h index 3a32dff75..3573ab311 100644 --- a/src/core/internal_network/sockets.h +++ b/src/core/internal_network/sockets.h @@ -9,7 +9,7 @@ #include #if defined(_WIN32) -#elif !YUZU_UNIX +#elif !CITRON_UNIX #error "Platform not implemented" #endif @@ -24,7 +24,7 @@ struct ProxyPacket; class SocketBase { public: -#ifdef YUZU_UNIX +#ifdef CITRON_UNIX using SOCKET = int; static constexpr SOCKET INVALID_SOCKET = -1; static constexpr SOCKET SOCKET_ERROR = -1; @@ -39,8 +39,8 @@ public: explicit SocketBase(SOCKET fd_) : fd{fd_} {} virtual ~SocketBase() = default; - YUZU_NON_COPYABLE(SocketBase); - YUZU_NON_MOVEABLE(SocketBase); + CITRON_NON_COPYABLE(SocketBase); + CITRON_NON_MOVEABLE(SocketBase); virtual Errno Initialize(Domain domain, Type type, Protocol protocol) = 0; diff --git a/src/core/loader/kip.cpp b/src/core/loader/kip.cpp index cd6982921..01078070e 100644 --- a/src/core/loader/kip.cpp +++ b/src/core/loader/kip.cpp @@ -14,7 +14,7 @@ namespace Loader { namespace { constexpr u32 PageAlignSize(u32 size) { - return static_cast((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK); + return static_cast((size + Core::Memory::CITRON_PAGEMASK) & ~Core::Memory::CITRON_PAGEMASK); } } // Anonymous namespace diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index f4e932cec..f5957e73a 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h @@ -143,8 +143,8 @@ std::ostream& operator<<(std::ostream& os, ResultStatus status); /// Interface for loading an application class AppLoader { public: - YUZU_NON_COPYABLE(AppLoader); - YUZU_NON_MOVEABLE(AppLoader); + CITRON_NON_COPYABLE(AppLoader); + CITRON_NON_MOVEABLE(AppLoader); struct LoadParameters { s32 main_thread_priority; diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 1d96dc4c8..58570dcfe 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -140,7 +140,7 @@ bool AppLoader_NRO::IsHomebrew() { } static constexpr u32 PageAlignSize(u32 size) { - return static_cast((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK); + return static_cast((size + Core::Memory::CITRON_PAGEMASK) & ~Core::Memory::CITRON_PAGEMASK); } static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process, diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 583b7e927..1e5aade29 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -49,7 +49,7 @@ std::vector DecompressSegment(const std::vector& compressed_data, } constexpr u32 PageAlignSize(u32 size) { - return static_cast((size + Core::Memory::YUZU_PAGEMASK) & ~Core::Memory::YUZU_PAGEMASK); + return static_cast((size + Core::Memory::CITRON_PAGEMASK) & ~Core::Memory::CITRON_PAGEMASK); } } // Anonymous namespace diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 6f7703fce..62437415b 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -66,11 +66,11 @@ struct Memory::Impl { void MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, Common::PhysicalAddress target, Common::MemoryPermission perms, bool separate_heap) { - ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size); - ASSERT_MSG((base & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base)); + ASSERT_MSG((size & CITRON_PAGEMASK) == 0, "non-page aligned size: {:016X}", size); + ASSERT_MSG((base & CITRON_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base)); ASSERT_MSG(target >= DramMemoryMap::Base, "Out of bounds target: {:016X}", GetInteger(target)); - MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, target, + MapPages(page_table, base / CITRON_PAGESIZE, size / CITRON_PAGESIZE, target, Common::PageType::Memory); if (current_page_table->fastmem_arena) { @@ -81,9 +81,9 @@ struct Memory::Impl { void UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, bool separate_heap) { - ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size); - ASSERT_MSG((base & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base)); - MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, 0, + ASSERT_MSG((size & CITRON_PAGEMASK) == 0, "non-page aligned size: {:016X}", size); + ASSERT_MSG((base & CITRON_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base)); + MapPages(page_table, base / CITRON_PAGESIZE, size / CITRON_PAGESIZE, 0, Common::PageType::Unmapped); if (current_page_table->fastmem_arena) { @@ -93,8 +93,8 @@ struct Memory::Impl { void ProtectRegion(Common::PageTable& page_table, VAddr vaddr, u64 size, Common::MemoryPermission perms) { - ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size); - ASSERT_MSG((vaddr & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", vaddr); + ASSERT_MSG((size & CITRON_PAGEMASK) == 0, "non-page aligned size: {:016X}", size); + ASSERT_MSG((vaddr & CITRON_PAGEMASK) == 0, "non-page aligned base: {:016X}", vaddr); if (!current_page_table->fastmem_arena) { return; @@ -102,9 +102,9 @@ struct Memory::Impl { u64 protect_bytes{}; u64 protect_begin{}; - for (u64 addr = vaddr; addr < vaddr + size; addr += YUZU_PAGESIZE) { + for (u64 addr = vaddr; addr < vaddr + size; addr += CITRON_PAGESIZE) { const Common::PageType page_type{ - current_page_table->pointers[addr >> YUZU_PAGEBITS].Type()}; + current_page_table->pointers[addr >> CITRON_PAGEBITS].Type()}; switch (page_type) { case Common::PageType::RasterizerCachedMemory: if (protect_bytes > 0) { @@ -116,7 +116,7 @@ struct Memory::Impl { if (protect_bytes == 0) { protect_begin = addr; } - protect_bytes += YUZU_PAGESIZE; + protect_bytes += CITRON_PAGESIZE; } } @@ -127,7 +127,7 @@ struct Memory::Impl { [[nodiscard]] u8* GetPointerFromRasterizerCachedMemory(u64 vaddr) const { const Common::PhysicalAddress paddr{ - current_page_table->backing_addr[vaddr >> YUZU_PAGEBITS]}; + current_page_table->backing_addr[vaddr >> CITRON_PAGEBITS]}; if (!paddr) { return {}; @@ -138,7 +138,7 @@ struct Memory::Impl { [[nodiscard]] u8* GetPointerFromDebugMemory(u64 vaddr) const { const Common::PhysicalAddress paddr{ - current_page_table->backing_addr[vaddr >> YUZU_PAGEBITS]}; + current_page_table->backing_addr[vaddr >> CITRON_PAGEBITS]}; if (paddr == 0) { return {}; @@ -247,8 +247,8 @@ struct Memory::Impl { auto on_memory, auto on_rasterizer, auto increment) { const auto& page_table = *current_page_table; std::size_t remaining_size = size; - std::size_t page_index = addr >> YUZU_PAGEBITS; - std::size_t page_offset = addr & YUZU_PAGEMASK; + std::size_t page_index = addr >> CITRON_PAGEBITS; + std::size_t page_offset = addr & CITRON_PAGEMASK; bool user_accessible = true; if (!AddressSpaceContains(page_table, addr, size)) [[unlikely]] { @@ -258,9 +258,9 @@ struct Memory::Impl { while (remaining_size) { const std::size_t copy_amount = - std::min(static_cast(YUZU_PAGESIZE) - page_offset, remaining_size); + std::min(static_cast(CITRON_PAGESIZE) - page_offset, remaining_size); const auto current_vaddr = - static_cast((page_index << YUZU_PAGEBITS) + page_offset); + static_cast((page_index << CITRON_PAGEBITS) + page_offset); const auto [pointer, type] = page_table.pointers[page_index].PointerType(); switch (type) { @@ -271,7 +271,7 @@ struct Memory::Impl { } case Common::PageType::Memory: { u8* mem_ptr = - reinterpret_cast(pointer + page_offset + (page_index << YUZU_PAGEBITS)); + reinterpret_cast(pointer + page_offset + (page_index << CITRON_PAGEBITS)); on_memory(copy_amount, mem_ptr); break; } @@ -336,16 +336,16 @@ struct Memory::Impl { } const u8* GetSpan(const VAddr src_addr, const std::size_t size) const { - if (current_page_table->blocks[src_addr >> YUZU_PAGEBITS] == - current_page_table->blocks[(src_addr + size) >> YUZU_PAGEBITS]) { + if (current_page_table->blocks[src_addr >> CITRON_PAGEBITS] == + current_page_table->blocks[(src_addr + size) >> CITRON_PAGEBITS]) { return GetPointerSilent(src_addr); } return nullptr; } u8* GetSpan(const VAddr src_addr, const std::size_t size) { - if (current_page_table->blocks[src_addr >> YUZU_PAGEBITS] == - current_page_table->blocks[(src_addr + size) >> YUZU_PAGEBITS]) { + if (current_page_table->blocks[src_addr >> CITRON_PAGEBITS] == + current_page_table->blocks[(src_addr + size) >> CITRON_PAGEBITS]) { return GetPointerSilent(src_addr); } return nullptr; @@ -499,10 +499,10 @@ struct Memory::Impl { // Iterate over a contiguous CPU address space, marking/unmarking the region. // The region is at a granularity of CPU pages. - const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1; - for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) { + const u64 num_pages = ((vaddr + size - 1) >> CITRON_PAGEBITS) - (vaddr >> CITRON_PAGEBITS) + 1; + for (u64 i = 0; i < num_pages; ++i, vaddr += CITRON_PAGESIZE) { const Common::PageType page_type{ - current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Type()}; + current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Type()}; if (debug) { // Switch page type to debug if now debug switch (page_type) { @@ -514,7 +514,7 @@ struct Memory::Impl { // Page is already marked. break; case Common::PageType::Memory: - current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store( + current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Store( 0, Common::PageType::DebugMemory); break; default: @@ -531,9 +531,9 @@ struct Memory::Impl { // Don't mess with already non-debug or rasterizer memory. break; case Common::PageType::DebugMemory: { - u8* const pointer{GetPointerFromDebugMemory(vaddr & ~YUZU_PAGEMASK)}; - current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store( - reinterpret_cast(pointer) - (vaddr & ~YUZU_PAGEMASK), + u8* const pointer{GetPointerFromDebugMemory(vaddr & ~CITRON_PAGEMASK)}; + current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Store( + reinterpret_cast(pointer) - (vaddr & ~CITRON_PAGEMASK), Common::PageType::Memory); break; } @@ -565,10 +565,10 @@ struct Memory::Impl { // granularity of CPU pages, hence why we iterate on a CPU page basis (note: GPU page size // is different). This assumes the specified GPU address region is contiguous as well. - const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1; - for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) { + const u64 num_pages = ((vaddr + size - 1) >> CITRON_PAGEBITS) - (vaddr >> CITRON_PAGEBITS) + 1; + for (u64 i = 0; i < num_pages; ++i, vaddr += CITRON_PAGESIZE) { const Common::PageType page_type{ - current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Type()}; + current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Type()}; if (cached) { // Switch page type to cached if now cached switch (page_type) { @@ -578,7 +578,7 @@ struct Memory::Impl { break; case Common::PageType::DebugMemory: case Common::PageType::Memory: - current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store( + current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Store( 0, Common::PageType::RasterizerCachedMemory); break; case Common::PageType::RasterizerCachedMemory: @@ -601,16 +601,16 @@ struct Memory::Impl { // that this area is already unmarked as cached. break; case Common::PageType::RasterizerCachedMemory: { - u8* const pointer{GetPointerFromRasterizerCachedMemory(vaddr & ~YUZU_PAGEMASK)}; + u8* const pointer{GetPointerFromRasterizerCachedMemory(vaddr & ~CITRON_PAGEMASK)}; if (pointer == nullptr) { // It's possible that this function has been called while updating the // pagetable after unmapping a VMA. In that case the underlying VMA will no // longer exist, and we should just leave the pagetable entry blank. - current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store( + current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Store( 0, Common::PageType::Unmapped); } else { - current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Store( - reinterpret_cast(pointer) - (vaddr & ~YUZU_PAGEMASK), + current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Store( + reinterpret_cast(pointer) - (vaddr & ~CITRON_PAGEMASK), Common::PageType::Memory); } break; @@ -636,7 +636,7 @@ struct Memory::Impl { auto base = GetInteger(base_address); LOG_DEBUG(HW_Memory, "Mapping {:016X} onto {:016X}-{:016X}", GetInteger(target), - base * YUZU_PAGESIZE, (base + size) * YUZU_PAGESIZE); + base * CITRON_PAGESIZE, (base + size) * CITRON_PAGESIZE); const auto end = base + size; ASSERT_MSG(end <= page_table.pointers.size(), "out of range mapping at {:016X}", @@ -644,7 +644,7 @@ struct Memory::Impl { if (!target) { ASSERT_MSG(type != Common::PageType::Memory, - "Mapping memory page without a pointer @ {:016x}", base * YUZU_PAGESIZE); + "Mapping memory page without a pointer @ {:016x}", base * CITRON_PAGESIZE); while (base != end) { page_table.pointers[base].Store(0, type); @@ -657,17 +657,17 @@ struct Memory::Impl { while (base != end) { auto host_ptr = reinterpret_cast(system.DeviceMemory().GetPointer(target)) - - (base << YUZU_PAGEBITS); - auto backing = GetInteger(target) - (base << YUZU_PAGEBITS); + (base << CITRON_PAGEBITS); + auto backing = GetInteger(target) - (base << CITRON_PAGEBITS); page_table.pointers[base].Store(host_ptr, type); page_table.backing_addr[base] = backing; - page_table.blocks[base] = orig_base << YUZU_PAGEBITS; + page_table.blocks[base] = orig_base << CITRON_PAGEBITS; ASSERT_MSG(page_table.pointers[base].Pointer(), "memory mapping base yield a nullptr within the table"); base += 1; - target += YUZU_PAGESIZE; + target += CITRON_PAGESIZE; } } } @@ -682,7 +682,7 @@ struct Memory::Impl { } // Avoid adding any extra logic to this fast-path block - const uintptr_t raw_pointer = current_page_table->pointers[vaddr >> YUZU_PAGEBITS].Raw(); + const uintptr_t raw_pointer = current_page_table->pointers[vaddr >> CITRON_PAGEBITS].Raw(); if (const uintptr_t pointer = Common::PageTable::PageInfo::ExtractPointer(raw_pointer)) { return reinterpret_cast(pointer + vaddr); } @@ -837,7 +837,7 @@ struct Memory::Impl { }; gpu_device_memory->ApplyOpOnPointer(p, scratch_buffers[core], [&](DAddr address) { auto& current_area = rasterizer_write_areas[core]; - PAddr subaddress = address >> YUZU_PAGEBITS; + PAddr subaddress = address >> CITRON_PAGEBITS; bool do_collection = current_area.last_address == subaddress; if (!do_collection) [[unlikely]] { do_collection = system.GPU().OnCPUWrite(address, size); @@ -925,7 +925,7 @@ void Memory::ProtectRegion(Common::PageTable& page_table, Common::ProcessAddress bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const { const auto& page_table = *impl->current_page_table; - const size_t page = vaddr >> YUZU_PAGEBITS; + const size_t page = vaddr >> CITRON_PAGEBITS; if (page >= page_table.pointers.size()) { return false; } @@ -936,9 +936,9 @@ bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const { bool Memory::IsValidVirtualAddressRange(Common::ProcessAddress base, u64 size) const { Common::ProcessAddress end = base + size; - Common::ProcessAddress page = Common::AlignDown(GetInteger(base), YUZU_PAGESIZE); + Common::ProcessAddress page = Common::AlignDown(GetInteger(base), CITRON_PAGESIZE); - for (; page < end; page += YUZU_PAGESIZE) { + for (; page < end; page += CITRON_PAGESIZE) { if (!IsValidVirtualAddress(page)) { return false; } diff --git a/src/core/memory.h b/src/core/memory.h index f7e6b297f..3f315ff7a 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -39,9 +39,9 @@ namespace Core::Memory { * Page size used by the ARM architecture. This is the smallest granularity with which memory can * be mapped. */ -constexpr std::size_t YUZU_PAGEBITS = 12; -constexpr u64 YUZU_PAGESIZE = 1ULL << YUZU_PAGEBITS; -constexpr u64 YUZU_PAGEMASK = YUZU_PAGESIZE - 1; +constexpr std::size_t CITRON_PAGEBITS = 12; +constexpr u64 CITRON_PAGESIZE = 1ULL << CITRON_PAGEBITS; +constexpr u64 CITRON_PAGEMASK = CITRON_PAGESIZE - 1; /// Virtual user-space memory regions enum : u64 { diff --git a/src/dedicated_room/CMakeLists.txt b/src/dedicated_room/CMakeLists.txt index c534df4ca..f42b5a711 100644 --- a/src/dedicated_room/CMakeLists.txt +++ b/src/dedicated_room/CMakeLists.txt @@ -23,7 +23,7 @@ if(UNIX AND NOT APPLE) install(TARGETS citron-room) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(citron-room PRIVATE precompiled_headers.h) endif() diff --git a/src/dedicated_room/citron_room.rc b/src/dedicated_room/citron_room.rc index 55785cc61..c56e4fb55 100644 --- a/src/dedicated_room/citron_room.rc +++ b/src/dedicated_room/citron_room.rc @@ -9,7 +9,7 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -YUZU_ICON ICON "../../dist/citron.ico" +CITRON_ICON ICON "../../dist/citron.ico" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/hid_core/CMakeLists.txt b/src/hid_core/CMakeLists.txt index 2699e1599..7dbb7acd8 100644 --- a/src/hid_core/CMakeLists.txt +++ b/src/hid_core/CMakeLists.txt @@ -161,6 +161,6 @@ endif() create_target_directory_groups(hid_core) target_link_libraries(hid_core PUBLIC core) -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(hid_core PRIVATE precompiled_headers.h) endif() diff --git a/src/hid_core/frontend/emulated_console.h b/src/hid_core/frontend/emulated_console.h index 847551395..cec3c69db 100644 --- a/src/hid_core/frontend/emulated_console.h +++ b/src/hid_core/frontend/emulated_console.h @@ -80,8 +80,8 @@ public: explicit EmulatedConsole(); ~EmulatedConsole(); - YUZU_NON_COPYABLE(EmulatedConsole); - YUZU_NON_MOVEABLE(EmulatedConsole); + CITRON_NON_COPYABLE(EmulatedConsole); + CITRON_NON_MOVEABLE(EmulatedConsole); /// Removes all callbacks created from input devices void UnloadInput(); diff --git a/src/hid_core/frontend/emulated_controller.h b/src/hid_core/frontend/emulated_controller.h index 17ad6069e..85370a736 100644 --- a/src/hid_core/frontend/emulated_controller.h +++ b/src/hid_core/frontend/emulated_controller.h @@ -178,8 +178,8 @@ public: explicit EmulatedController(NpadIdType npad_id_type_); ~EmulatedController(); - YUZU_NON_COPYABLE(EmulatedController); - YUZU_NON_MOVEABLE(EmulatedController); + CITRON_NON_COPYABLE(EmulatedController); + CITRON_NON_MOVEABLE(EmulatedController); /// Converts the controller type from settings to npad type static NpadStyleIndex MapSettingsTypeToNPad(Settings::ControllerType type); diff --git a/src/hid_core/frontend/emulated_devices.h b/src/hid_core/frontend/emulated_devices.h index b2e57318c..a77558c56 100644 --- a/src/hid_core/frontend/emulated_devices.h +++ b/src/hid_core/frontend/emulated_devices.h @@ -81,8 +81,8 @@ public: explicit EmulatedDevices(); ~EmulatedDevices(); - YUZU_NON_COPYABLE(EmulatedDevices); - YUZU_NON_MOVEABLE(EmulatedDevices); + CITRON_NON_COPYABLE(EmulatedDevices); + CITRON_NON_MOVEABLE(EmulatedDevices); /// Removes all callbacks created from input devices void UnloadInput(); diff --git a/src/hid_core/hid_core.h b/src/hid_core/hid_core.h index dae29c506..cbe0e90c9 100644 --- a/src/hid_core/hid_core.h +++ b/src/hid_core/hid_core.h @@ -21,8 +21,8 @@ public: explicit HIDCore(); ~HIDCore(); - YUZU_NON_COPYABLE(HIDCore); - YUZU_NON_MOVEABLE(HIDCore); + CITRON_NON_COPYABLE(HIDCore); + CITRON_NON_MOVEABLE(HIDCore); EmulatedController* GetEmulatedController(NpadIdType npad_id_type); const EmulatedController* GetEmulatedController(NpadIdType npad_id_type) const; diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index d455323e0..c097e6476 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -89,7 +89,7 @@ endif() create_target_directory_groups(input_common) target_link_libraries(input_common PUBLIC hid_core PRIVATE common Boost::headers) -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(input_common PRIVATE precompiled_headers.h) endif() diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 8e306219f..8ac323c82 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -25,6 +25,6 @@ if (ENABLE_WEB_SERVICE) target_link_libraries(network PRIVATE web_service) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(network PRIVATE precompiled_headers.h) endif() diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt index 19db17c6d..35828b5a6 100644 --- a/src/shader_recompiler/CMakeLists.txt +++ b/src/shader_recompiler/CMakeLists.txt @@ -263,6 +263,6 @@ endif() create_target_directory_groups(shader_recompiler) -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(shader_recompiler PRIVATE precompiled_headers.h) endif() diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 1e158f375..338b7710a 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -26,6 +26,6 @@ target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Catch2::Catch2WithMain add_test(NAME tests COMMAND tests) -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(tests PRIVATE precompiled_headers.h) endif() diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 2de2beb6e..bcf9cfee0 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -320,7 +320,7 @@ add_library(video_core STATIC target_link_libraries(video_core PUBLIC common core) target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder) -if (YUZU_USE_BUNDLED_FFMPEG AND NOT (WIN32 OR ANDROID)) +if (CITRON_USE_BUNDLED_FFMPEG AND NOT (WIN32 OR ANDROID)) add_dependencies(video_core ffmpeg-build) endif() @@ -380,11 +380,11 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) target_link_libraries(video_core PRIVATE dynarmic::dynarmic) endif() -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(video_core PRIVATE precompiled_headers.h) endif() -if (YUZU_ENABLE_LTO) +if (CITRON_ENABLE_LTO) set_property(TARGET video_core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) endif() diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.h b/src/video_core/host1x/ffmpeg/ffmpeg.h index 1de0bbd83..b4552b965 100644 --- a/src/video_core/host1x/ffmpeg/ffmpeg.h +++ b/src/video_core/host1x/ffmpeg/ffmpeg.h @@ -43,8 +43,8 @@ class DeinterlaceFilter; // Wraps an AVPacket, a container for compressed bitstream data. class Packet { public: - YUZU_NON_COPYABLE(Packet); - YUZU_NON_MOVEABLE(Packet); + CITRON_NON_COPYABLE(Packet); + CITRON_NON_MOVEABLE(Packet); explicit Packet(std::span data); ~Packet(); @@ -60,8 +60,8 @@ private: // Wraps an AVFrame, a container for audio and video stream data. class Frame { public: - YUZU_NON_COPYABLE(Frame); - YUZU_NON_MOVEABLE(Frame); + CITRON_NON_COPYABLE(Frame); + CITRON_NON_MOVEABLE(Frame); explicit Frame(); ~Frame(); @@ -109,8 +109,8 @@ private: // Wraps an AVCodec, a type containing information about a codec. class Decoder { public: - YUZU_NON_COPYABLE(Decoder); - YUZU_NON_MOVEABLE(Decoder); + CITRON_NON_COPYABLE(Decoder); + CITRON_NON_MOVEABLE(Decoder); explicit Decoder(Tegra::Host1x::NvdecCommon::VideoCodec codec); ~Decoder() = default; @@ -128,8 +128,8 @@ private: // Wraps AVBufferRef for an accelerated decoder. class HardwareContext { public: - YUZU_NON_COPYABLE(HardwareContext); - YUZU_NON_MOVEABLE(HardwareContext); + CITRON_NON_COPYABLE(HardwareContext); + CITRON_NON_MOVEABLE(HardwareContext); static std::vector GetSupportedDeviceTypes(); @@ -151,8 +151,8 @@ private: // Wraps an AVCodecContext. class DecoderContext { public: - YUZU_NON_COPYABLE(DecoderContext); - YUZU_NON_MOVEABLE(DecoderContext); + CITRON_NON_COPYABLE(DecoderContext); + CITRON_NON_MOVEABLE(DecoderContext); explicit DecoderContext(const Decoder& decoder); ~DecoderContext(); @@ -173,8 +173,8 @@ private: // Wraps an AVFilterGraph. class DeinterlaceFilter { public: - YUZU_NON_COPYABLE(DeinterlaceFilter); - YUZU_NON_MOVEABLE(DeinterlaceFilter); + CITRON_NON_COPYABLE(DeinterlaceFilter); + CITRON_NON_MOVEABLE(DeinterlaceFilter); explicit DeinterlaceFilter(const Frame& frame); ~DeinterlaceFilter(); @@ -191,8 +191,8 @@ private: class DecodeApi { public: - YUZU_NON_COPYABLE(DecodeApi); - YUZU_NON_MOVEABLE(DecodeApi); + CITRON_NON_COPYABLE(DecodeApi); + CITRON_NON_MOVEABLE(DecodeApi); DecodeApi() = default; ~DecodeApi() = default; diff --git a/src/video_core/host_shaders/fidelityfx_fsr.frag b/src/video_core/host_shaders/fidelityfx_fsr.frag index 54eedb450..5496e8c90 100644 --- a/src/video_core/host_shaders/fidelityfx_fsr.frag +++ b/src/video_core/host_shaders/fidelityfx_fsr.frag @@ -39,7 +39,7 @@ layout(set=0,binding=0) uniform sampler2D InputTexture; #define A_GLSL 1 #define FSR_RCAS_PASSTHROUGH_ALPHA 1 -#ifndef YUZU_USE_FP16 +#ifndef CITRON_USE_FP16 #include "ffx_a.h" #if USE_EASU @@ -77,7 +77,7 @@ layout (location = 0) out vec4 frag_color; void CurrFilter(AU2 pos) { #if USE_EASU - #ifndef YUZU_USE_FP16 + #ifndef CITRON_USE_FP16 AF3 c; FsrEasuF(c, pos, Const0, Const1, Const2, Const3); frag_color = AF4(c, texture(InputTexture, frag_texcoord).a); @@ -88,7 +88,7 @@ void CurrFilter(AU2 pos) { #endif #endif #if USE_RCAS - #ifndef YUZU_USE_FP16 + #ifndef CITRON_USE_FP16 AF4 c; FsrRcasF(c.r, c.g, c.b, c.a, pos, Const0); frag_color = c; diff --git a/src/video_core/host_shaders/opengl_fidelityfx_fsr.frag b/src/video_core/host_shaders/opengl_fidelityfx_fsr.frag index fc47d3810..434b4192c 100644 --- a/src/video_core/host_shaders/opengl_fidelityfx_fsr.frag +++ b/src/video_core/host_shaders/opengl_fidelityfx_fsr.frag @@ -33,12 +33,12 @@ layout (location = 0) uniform uvec4 constants[4]; #define A_GLSL 1 #define FSR_RCAS_PASSTHROUGH_ALPHA 1 -#ifdef YUZU_USE_FP16 +#ifdef CITRON_USE_FP16 #define A_HALF #endif #include "ffx_a.h" -#ifndef YUZU_USE_FP16 +#ifndef CITRON_USE_FP16 layout (binding=0) uniform sampler2D InputTexture; #if USE_EASU #define FSR_EASU_F 1 @@ -74,7 +74,7 @@ layout (location = 0) out vec4 frag_color; void CurrFilter(AU2 pos) { #if USE_EASU - #ifndef YUZU_USE_FP16 + #ifndef CITRON_USE_FP16 AF3 c; FsrEasuF(c, pos, constants[0], constants[1], constants[2], constants[3]); frag_color = AF4(c, texture(InputTexture, frag_texcoord).a); @@ -85,7 +85,7 @@ void CurrFilter(AU2 pos) #endif #endif #if USE_RCAS - #ifndef YUZU_USE_FP16 + #ifndef CITRON_USE_FP16 AF4 c; FsrRcasF(c.r, c.g, c.b, c.a, pos, constants[0]); frag_color = c; diff --git a/src/video_core/host_shaders/opengl_present_scaleforce.frag b/src/video_core/host_shaders/opengl_present_scaleforce.frag index 1598575a1..01948e591 100644 --- a/src/video_core/host_shaders/opengl_present_scaleforce.frag +++ b/src/video_core/host_shaders/opengl_present_scaleforce.frag @@ -7,7 +7,7 @@ #extension GL_ARB_separate_shader_objects : enable -#ifdef YUZU_USE_FP16 +#ifdef CITRON_USE_FP16 #extension GL_AMD_gpu_shader_half_float : enable #extension GL_NV_gpu_shader5 : enable diff --git a/src/video_core/host_shaders/vulkan_fidelityfx_fsr_easu_fp16.frag b/src/video_core/host_shaders/vulkan_fidelityfx_fsr_easu_fp16.frag index 05d033310..1ab891191 100644 --- a/src/video_core/host_shaders/vulkan_fidelityfx_fsr_easu_fp16.frag +++ b/src/video_core/host_shaders/vulkan_fidelityfx_fsr_easu_fp16.frag @@ -4,7 +4,7 @@ #version 460 core #extension GL_GOOGLE_include_directive : enable -#define YUZU_USE_FP16 +#define CITRON_USE_FP16 #define USE_EASU 1 #define VERSION 1 diff --git a/src/video_core/host_shaders/vulkan_fidelityfx_fsr_rcas_fp16.frag b/src/video_core/host_shaders/vulkan_fidelityfx_fsr_rcas_fp16.frag index c017214a5..c0a644758 100644 --- a/src/video_core/host_shaders/vulkan_fidelityfx_fsr_rcas_fp16.frag +++ b/src/video_core/host_shaders/vulkan_fidelityfx_fsr_rcas_fp16.frag @@ -4,7 +4,7 @@ #version 460 core #extension GL_GOOGLE_include_directive : enable -#define YUZU_USE_FP16 +#define CITRON_USE_FP16 #define USE_RCAS 1 #define VERSION 1 diff --git a/src/video_core/host_shaders/vulkan_present_scaleforce_fp16.frag b/src/video_core/host_shaders/vulkan_present_scaleforce_fp16.frag index cea5dac9d..82c2eb185 100644 --- a/src/video_core/host_shaders/vulkan_present_scaleforce_fp16.frag +++ b/src/video_core/host_shaders/vulkan_present_scaleforce_fp16.frag @@ -6,6 +6,6 @@ #extension GL_GOOGLE_include_directive : enable #define VERSION 2 -#define YUZU_USE_FP16 +#define CITRON_USE_FP16 #include "opengl_present_scaleforce.frag" diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index e1019f228..8d1087096 100644 --- a/src/video_core/query_cache.h +++ b/src/video_core/query_cache.h @@ -253,8 +253,8 @@ private: return cache_begin < addr_end && addr_begin < cache_end; }; - const u64 page_end = addr_end >> YUZU_PAGEBITS; - for (u64 page = addr_begin >> YUZU_PAGEBITS; page <= page_end; ++page) { + const u64 page_end = addr_end >> CITRON_PAGEBITS; + for (u64 page = addr_begin >> CITRON_PAGEBITS; page <= page_end; ++page) { const auto& it = cached_queries.find(page); if (it == std::end(cached_queries)) { continue; @@ -281,14 +281,14 @@ private: /// Registers the passed parameters as cached and returns a pointer to the stored cached query. CachedQuery* Register(VideoCore::QueryType type, VAddr cpu_addr, u8* host_ptr, bool timestamp) { - const u64 page = static_cast(cpu_addr) >> YUZU_PAGEBITS; + const u64 page = static_cast(cpu_addr) >> CITRON_PAGEBITS; return &cached_queries[page].emplace_back(static_cast(*this), type, cpu_addr, host_ptr); } /// Tries to a get a cached query. Returns nullptr on failure. CachedQuery* TryGet(VAddr addr) { - const u64 page = static_cast(addr) >> YUZU_PAGEBITS; + const u64 page = static_cast(addr) >> CITRON_PAGEBITS; const auto it = cached_queries.find(page); if (it == std::end(cached_queries)) { return nullptr; @@ -338,8 +338,8 @@ private: rasterizer.SyncOperation(std::move(operation)); } - static constexpr std::uintptr_t YUZU_PAGESIZE = 4096; - static constexpr unsigned YUZU_PAGEBITS = 12; + static constexpr std::uintptr_t CITRON_PAGESIZE = 4096; + static constexpr unsigned CITRON_PAGEBITS = 12; Common::SlotVector slot_async_jobs; diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index 67427f937..91efe6f0b 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -30,8 +30,8 @@ struct RendererSettings { class RendererBase { public: - YUZU_NON_COPYABLE(RendererBase); - YUZU_NON_MOVEABLE(RendererBase); + CITRON_NON_COPYABLE(RendererBase); + CITRON_NON_MOVEABLE(RendererBase); explicit RendererBase(Core::Frontend::EmuWindow& window, std::unique_ptr context); diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 9be1b0805..4995150b7 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -108,14 +108,14 @@ bool IsASTCSupported() { static bool HasSlowSoftwareAstc(std::string_view vendor_name, std::string_view renderer) { // ifdef for Unix reduces string comparisons for non-Windows drivers, and Intel -#ifdef YUZU_UNIX +#ifdef CITRON_UNIX // Sorted vaguely by how likely a vendor is to appear if (vendor_name == "AMD") { // RadeonSI return true; } if (vendor_name == "Intel") { - // Must be inside YUZU_UNIX ifdef as the Windows driver uses the same vendor string + // Must be inside CITRON_UNIX ifdef as the Windows driver uses the same vendor string // iris, crocus const bool is_intel_dg = (renderer.find("DG") != std::string_view::npos); return is_intel_dg; diff --git a/src/video_core/renderer_opengl/gl_resource_manager.h b/src/video_core/renderer_opengl/gl_resource_manager.h index 6ca8227bd..e936e7ace 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.h +++ b/src/video_core/renderer_opengl/gl_resource_manager.h @@ -12,7 +12,7 @@ namespace OpenGL { class OGLRenderbuffer final { public: - YUZU_NON_COPYABLE(OGLRenderbuffer); + CITRON_NON_COPYABLE(OGLRenderbuffer); OGLRenderbuffer() = default; @@ -39,7 +39,7 @@ public: class OGLTexture final { public: - YUZU_NON_COPYABLE(OGLTexture); + CITRON_NON_COPYABLE(OGLTexture); OGLTexture() = default; @@ -66,7 +66,7 @@ public: class OGLTextureView final { public: - YUZU_NON_COPYABLE(OGLTextureView); + CITRON_NON_COPYABLE(OGLTextureView); OGLTextureView() = default; @@ -93,7 +93,7 @@ public: class OGLSampler final { public: - YUZU_NON_COPYABLE(OGLSampler); + CITRON_NON_COPYABLE(OGLSampler); OGLSampler() = default; @@ -120,7 +120,7 @@ public: class OGLShader final { public: - YUZU_NON_COPYABLE(OGLShader); + CITRON_NON_COPYABLE(OGLShader); OGLShader() = default; @@ -143,7 +143,7 @@ public: class OGLProgram final { public: - YUZU_NON_COPYABLE(OGLProgram); + CITRON_NON_COPYABLE(OGLProgram); OGLProgram() = default; @@ -167,7 +167,7 @@ public: class OGLAssemblyProgram final { public: - YUZU_NON_COPYABLE(OGLAssemblyProgram); + CITRON_NON_COPYABLE(OGLAssemblyProgram); OGLAssemblyProgram() = default; @@ -191,7 +191,7 @@ public: class OGLPipeline final { public: - YUZU_NON_COPYABLE(OGLPipeline); + CITRON_NON_COPYABLE(OGLPipeline); OGLPipeline() = default; OGLPipeline(OGLPipeline&& o) noexcept : handle{std::exchange(o.handle, 0)} {} @@ -215,7 +215,7 @@ public: class OGLBuffer final { public: - YUZU_NON_COPYABLE(OGLBuffer); + CITRON_NON_COPYABLE(OGLBuffer); OGLBuffer() = default; @@ -242,7 +242,7 @@ public: class OGLSync final { public: - YUZU_NON_COPYABLE(OGLSync); + CITRON_NON_COPYABLE(OGLSync); OGLSync() = default; @@ -271,7 +271,7 @@ public: class OGLFramebuffer final { public: - YUZU_NON_COPYABLE(OGLFramebuffer); + CITRON_NON_COPYABLE(OGLFramebuffer); OGLFramebuffer() = default; @@ -298,7 +298,7 @@ public: class OGLQuery final { public: - YUZU_NON_COPYABLE(OGLQuery); + CITRON_NON_COPYABLE(OGLQuery); OGLQuery() = default; @@ -325,7 +325,7 @@ public: class OGLTransformFeedback final { public: - YUZU_NON_COPYABLE(OGLTransformFeedback); + CITRON_NON_COPYABLE(OGLTransformFeedback); OGLTransformFeedback() = default; diff --git a/src/video_core/shader_cache.cpp b/src/video_core/shader_cache.cpp index 2af32c8f2..2db1d1036 100644 --- a/src/video_core/shader_cache.cpp +++ b/src/video_core/shader_cache.cpp @@ -127,8 +127,8 @@ void ShaderCache::Register(std::unique_ptr data, VAddr addr, size_t const VAddr addr_end = addr + size; Entry* const entry = NewEntry(addr, addr_end, data.get()); - const u64 page_end = (addr_end + YUZU_PAGESIZE - 1) >> YUZU_PAGEBITS; - for (u64 page = addr >> YUZU_PAGEBITS; page < page_end; ++page) { + const u64 page_end = (addr_end + CITRON_PAGESIZE - 1) >> CITRON_PAGEBITS; + for (u64 page = addr >> CITRON_PAGEBITS; page < page_end; ++page) { invalidation_cache[page].push_back(entry); } @@ -139,8 +139,8 @@ void ShaderCache::Register(std::unique_ptr data, VAddr addr, size_t void ShaderCache::InvalidatePagesInRegion(VAddr addr, size_t size) { const VAddr addr_end = addr + size; - const u64 page_end = (addr_end + YUZU_PAGESIZE - 1) >> YUZU_PAGEBITS; - for (u64 page = addr >> YUZU_PAGEBITS; page < page_end; ++page) { + const u64 page_end = (addr_end + CITRON_PAGESIZE - 1) >> CITRON_PAGEBITS; + for (u64 page = addr >> CITRON_PAGEBITS; page < page_end; ++page) { auto it = invalidation_cache.find(page); if (it == invalidation_cache.end()) { continue; @@ -191,8 +191,8 @@ void ShaderCache::InvalidatePageEntries(std::vector& entries, VAddr addr } void ShaderCache::RemoveEntryFromInvalidationCache(const Entry* entry) { - const u64 page_end = (entry->addr_end + YUZU_PAGESIZE - 1) >> YUZU_PAGEBITS; - for (u64 page = entry->addr_start >> YUZU_PAGEBITS; page < page_end; ++page) { + const u64 page_end = (entry->addr_end + CITRON_PAGESIZE - 1) >> CITRON_PAGEBITS; + for (u64 page = entry->addr_start >> CITRON_PAGEBITS; page < page_end; ++page) { const auto entries_it = invalidation_cache.find(page); ASSERT(entries_it != invalidation_cache.end()); std::vector& entries = entries_it->second; diff --git a/src/video_core/shader_cache.h b/src/video_core/shader_cache.h index fd9bf2562..3e9c40205 100644 --- a/src/video_core/shader_cache.h +++ b/src/video_core/shader_cache.h @@ -36,8 +36,8 @@ struct ShaderInfo { }; class ShaderCache : public VideoCommon::ChannelSetupCaches { - static constexpr u64 YUZU_PAGEBITS = 14; - static constexpr u64 YUZU_PAGESIZE = u64(1) << YUZU_PAGEBITS; + static constexpr u64 CITRON_PAGEBITS = 14; + static constexpr u64 CITRON_PAGESIZE = u64(1) << CITRON_PAGEBITS; static constexpr size_t NUM_PROGRAMS = 6; diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index feb1c575e..2a911a359 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -732,7 +732,7 @@ template std::pair TextureCache

::TryFindFramebufferImageView( const Tegra::FramebufferConfig& config, DAddr cpu_addr) { // TODO: Properly implement this - const auto it = page_table.find(cpu_addr >> YUZU_PAGEBITS); + const auto it = page_table.find(cpu_addr >> CITRON_PAGEBITS); if (it == page_table.end()) { return {}; } @@ -2039,14 +2039,14 @@ void TextureCache

::UnregisterImage(ImageId image_id) { selected_page_table) { const auto page_it = selected_page_table.find(page); if (page_it == selected_page_table.end()) { - ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS); + ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << CITRON_PAGEBITS); return; } std::vector& image_ids = page_it->second; const auto vector_it = std::ranges::find(image_ids, image_id); if (vector_it == image_ids.end()) { ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}", - page << YUZU_PAGEBITS); + page << CITRON_PAGEBITS); return; } image_ids.erase(vector_it); @@ -2059,14 +2059,14 @@ void TextureCache

::UnregisterImage(ImageId image_id) { ForEachCPUPage(image.cpu_addr, image.guest_size_bytes, [this, map_id](u64 page) { const auto page_it = page_table.find(page); if (page_it == page_table.end()) { - ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS); + ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << CITRON_PAGEBITS); return; } std::vector& image_map_ids = page_it->second; const auto vector_it = std::ranges::find(image_map_ids, map_id); if (vector_it == image_map_ids.end()) { ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}", - page << YUZU_PAGEBITS); + page << CITRON_PAGEBITS); return; } image_map_ids.erase(vector_it); @@ -2087,7 +2087,7 @@ void TextureCache

::UnregisterImage(ImageId image_id) { ForEachCPUPage(cpu_addr, size, [this, image_id](u64 page) { const auto page_it = page_table.find(page); if (page_it == page_table.end()) { - ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS); + ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << CITRON_PAGEBITS); return; } std::vector& image_map_ids = page_it->second; diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h index da98a634b..7dd1fec82 100644 --- a/src/video_core/texture_cache/texture_cache_base.h +++ b/src/video_core/texture_cache/texture_cache_base.h @@ -92,7 +92,7 @@ public: template class TextureCache : public VideoCommon::ChannelSetupCaches { /// Address shift for caching images into a hash table - static constexpr u64 YUZU_PAGEBITS = 20; + static constexpr u64 CITRON_PAGEBITS = 20; /// Enables debugging features to the texture cache static constexpr bool ENABLE_VALIDATION = P::ENABLE_VALIDATION; @@ -257,8 +257,8 @@ private: template static void ForEachCPUPage(DAddr addr, size_t size, Func&& func) { static constexpr bool RETURNS_BOOL = std::is_same_v, bool>; - const u64 page_end = (addr + size - 1) >> YUZU_PAGEBITS; - for (u64 page = addr >> YUZU_PAGEBITS; page <= page_end; ++page) { + const u64 page_end = (addr + size - 1) >> CITRON_PAGEBITS; + for (u64 page = addr >> CITRON_PAGEBITS; page <= page_end; ++page) { if constexpr (RETURNS_BOOL) { if (func(page)) { break; @@ -272,8 +272,8 @@ private: template static void ForEachGPUPage(GPUVAddr addr, size_t size, Func&& func) { static constexpr bool RETURNS_BOOL = std::is_same_v, bool>; - const u64 page_end = (addr + size - 1) >> YUZU_PAGEBITS; - for (u64 page = addr >> YUZU_PAGEBITS; page <= page_end; ++page) { + const u64 page_end = (addr + size - 1) >> CITRON_PAGEBITS; + for (u64 page = addr >> CITRON_PAGEBITS; page <= page_end; ++page) { if constexpr (RETURNS_BOOL) { if (func(page)) { break; diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt index 02582aa04..473b4ff2a 100644 --- a/src/web_service/CMakeLists.txt +++ b/src/web_service/CMakeLists.txt @@ -19,6 +19,6 @@ add_library(web_service STATIC create_target_directory_groups(web_service) target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt) -if (YUZU_USE_PRECOMPILED_HEADERS) +if (CITRON_USE_PRECOMPILED_HEADERS) target_precompile_headers(web_service PRIVATE precompiled_headers.h) endif()