VERY experimental Nintendo Switch 2 emulator
C++
[*] basic in-house cpp linting (#4039)
lizzie89199f4d279b
diff --git a/CMakeLists.txt b/CMakeLists.txtindex e89eb4a999..268965bff1 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -306,7 +306,7 @@ if (YUZU_ROOM)add_compile_definitions(YUZU_ROOM)endif()-if ((ANDROID OR APPLE OR UNIX) AND (NOT PLATFORM_LINUX OR ANDROID) AND NOT WIN32)+if (UNIX AND NOT (PLATFORM_LINUX OR WIN32))if(CXX_APPLE OR CXX_CLANG)# libc++ has stop_token and jthread as experimentalset(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library")@@ -524,6 +524,8 @@ elseif (WIN32)# PSAPI is the Process Status APIset(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version crypt32 rpcrt4 gdi32 wldap32 mswsock)endif()+elseif (PLATFORM_MANAGARM)+ set(PLATFORM_LIBRARIES iconv intl)elseif (PLATFORM_HAIKU)# Haiku is so special :)set(PLATFORM_LIBRARIES bsd /boot/system/lib/libnetwork.so)diff --git a/src/common/cpu_features.cpp b/src/common/cpu_features.cppindex 2f2fae3a77..2e02c47826 100644--- a/src/common/cpu_features.cpp+++ b/src/common/cpu_features.cpp@@ -303,7 +303,7 @@ namespace {}[[nodiscard]] s64 GetHostCNTFRQ() noexcept {u64 cntfrq_el0 = 0;-#ifdef ANDROID+#ifdef __ANDROID__std::string_view board{""};char buffer[PROP_VALUE_MAX];int len{__system_property_get("ro.product.board", buffer)};diff --git a/src/common/error.cpp b/src/common/error.cppindex 1b2009db71..070c9a5c7e 100644--- a/src/common/error.cpp+++ b/src/common/error.cpp@@ -1,3 +1,6 @@+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project+// SPDX-License-Identifier: GPL-3.0-or-later+// SPDX-FileCopyrightText: 2013 Dolphin Emulator Project// SPDX-FileCopyrightText: 2014 Citra Emulator Project// SPDX-License-Identifier: GPL-2.0-or-later@@ -30,7 +33,7 @@ std::string NativeErrorToString(int e) {return ret;#elsechar err_str[255];-#if defined(ANDROID) || \+#if defined(__ANDROID__) || \(defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600)))// Thread safe (GNU-specific)const char* str = strerror_r(e, err_str, sizeof(err_str));diff --git a/src/common/fs/file.cpp b/src/common/fs/file.cppindex 854090e7b2..461a5eee35 100644--- a/src/common/fs/file.cpp+++ b/src/common/fs/file.cpp@@ -9,7 +9,7 @@#include "common/assert.h"#include "common/fs/file.h"#include "common/fs/fs.h"-#ifdef ANDROID+#ifdef __ANDROID__#include "common/fs/fs_android.h"#endif#include "common/logging.h"@@ -259,7 +259,7 @@ void IOFile::Open(const fs::path& path, FileAccessMode mode, FileType type, File} else {_wfopen_s(&file, path.c_str(), AccessModeToWStr(mode, type));}-#elif ANDROID+#elif __ANDROID__if (Android::IsContentUri(path)) {ASSERT_MSG(mode == FileAccessMode::Read, "Content URI file access is for read-only!");const auto fd = Android::OpenContentUri(path, Android::OpenMode::Read);@@ -396,7 +396,7 @@ u64 IOFile::GetSize() const {// Flush any unwritten buffered data into the file prior to retrieving the file size.std::fflush(file);-#if ANDROID+#ifdef __ANDROID__u64 file_size = 0;if (Android::IsContentUri(file_path)) {file_size = Android::GetSize(file_path);diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cppindex 3858b0f0c3..3683105d6e 100644--- a/src/common/fs/fs.cpp+++ b/src/common/fs/fs.cpp@@ -6,7 +6,7 @@#include "common/fs/file.h"#include "common/fs/fs.h"-#ifdef ANDROID+#ifdef __ANDROID__#include "common/fs/fs_android.h"#endif#include "common/fs/path_util.h"@@ -532,7 +532,7 @@ void IterateDirEntriesRecursively(const std::filesystem::path& path,bool Exists(const fs::path& path) {std::error_code ec;-#ifdef ANDROID+#ifdef __ANDROID__if (Android::IsContentUri(path)) {return Android::Exists(path);} else {@@ -545,7 +545,7 @@ bool Exists(const fs::path& path) {bool IsFile(const fs::path& path) {std::error_code ec;-#ifdef ANDROID+#ifdef __ANDROID__if (Android::IsContentUri(path)) {return !Android::IsDirectory(path);} else {@@ -558,7 +558,7 @@ bool IsFile(const fs::path& path) {bool IsDir(const fs::path& path) {std::error_code ec;-#ifdef ANDROID+#ifdef __ANDROID__if (Android::IsContentUri(path)) {return Android::IsDirectory(path);} else {@@ -611,7 +611,7 @@ fs::file_type GetEntryType(const fs::path& path) {}u64 GetSize(const fs::path& path) {-#ifdef ANDROID+#ifdef __ANDROID__if (Android::IsContentUri(path)) {return Android::GetSize(path);}diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cppindex 714e393293..93d2300ed1 100644--- a/src/common/fs/path_util.cpp+++ b/src/common/fs/path_util.cpp@@ -11,7 +11,7 @@#include "common/assert.h"#include "common/fs/fs.h"-#ifdef ANDROID+#ifdef __ANDROID__#include "common/fs/fs_android.h"#endif#include "common/fs/fs_paths.h"@@ -126,7 +126,7 @@ public:LEGACY_PATH(Yuzu, YUZU)LEGACY_PATH(Suyu, SUYU)#undef LEGACY_PATH-#elif ANDROID+#elif __ANDROID__ASSERT(!eden_path.empty());eden_path_cache = eden_path / CACHE_DIR;eden_path_config = eden_path / CONFIG_DIR;@@ -447,11 +447,11 @@ std::vector<std::string> SplitPathComponentsCopy(std::string_view filename) {std::string SanitizePath(std::string_view path_, DirectorySeparator directory_separator) {std::string path(path_);-#ifdef ANDROID+#ifdef __ANDROID__if (Android::IsContentUri(path)) {return path;}-#endif // ANDROID+#endif // __ANDROID__char type1 = directory_separator == DirectorySeparator::BackwardSlash ? '/' : '\\';char type2 = directory_separator == DirectorySeparator::BackwardSlash ? '\\' : '/';@@ -482,7 +482,7 @@ std::string GetParentPath(std::string_view path) {return std::string(path);}-#ifdef ANDROID+#ifdef __ANDROID__if (path[0] != '/') {std::string path_string{path};return FS::Android::GetParentDirectory(path_string);diff --git a/src/common/logging.cpp b/src/common/logging.cppindex 68e033b129..ccf509f451 100644--- a/src/common/logging.cpp+++ b/src/common/logging.cpp@@ -320,7 +320,7 @@ struct DebuggerBackend final : public Backend {void Flush() noexcept override {}};#endif-#ifdef ANDROID+#ifdef __ANDROID__/// @brief Backend that writes to the Android logcatstruct LogcatBackend : public Backend {explicit LogcatBackend() noexcept = default;@@ -359,7 +359,7 @@ struct Impl {#ifdef _WIN32lambda(static_cast<Backend&>(debugger_backend));#endif-#ifdef ANDROID+#ifdef __ANDROID__lambda(static_cast<Backend&>(lc_backend));#endif}@@ -372,7 +372,7 @@ struct Impl {#ifdef _WIN32DebuggerBackend debugger_backend{};#endif-#ifdef ANDROID+#ifdef __ANDROID__LogcatBackend lc_backend{};#endifstd::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()};diff --git a/src/common/settings.h b/src/common/settings.hindex f38e95d5a4..3e14a40a09 100644--- a/src/common/settings.h+++ b/src/common/settings.h@@ -359,7 +359,7 @@ struct Values {true,true};SwitchableSetting<int, true> fsr_sharpening_slider{linkage,-#ifdef ANDROID+#ifdef __ANDROID__0,#else25,@@ -417,7 +417,7 @@ struct Values {linkage, 0, "bg_blue", Category::Renderer, Specialization::Default, true, true};SwitchableSetting<GpuAccuracy, true> gpu_accuracy{linkage,-#ifdef ANDROID+#ifdef __ANDROID__GpuAccuracy::Low,#elseGpuAccuracy::Medium,@@ -447,7 +447,7 @@ struct Values {"nvdec_emulation", Category::RendererAdvanced};SwitchableSetting<AnisotropyMode, true> max_anisotropy{linkage,-#ifdef ANDROID+#ifdef __ANDROID__AnisotropyMode::Default,#elseAnisotropyMode::Automatic,@@ -500,7 +500,7 @@ struct Values {Category::RendererAdvanced};SwitchableSetting<bool> use_reactive_flushing{linkage,-#ifdef ANDROID+#ifdef __ANDROID__false,#elsetrue,@@ -519,7 +519,7 @@ struct Values {true,true};-#ifdef ANDROID+#ifdef __ANDROID__SwitchableSetting<bool> use_optimized_vertex_buffers{linkage,false,"use_optimized_vertex_buffers",@@ -553,7 +553,7 @@ struct Values {true,true};SwitchableSetting<bool> async_presentation{linkage,-#ifdef ANDROID+#ifdef __ANDROID__false,#elsefalse,@@ -599,7 +599,7 @@ struct Values {Category::RendererHacks};SwitchableSetting<ExtendedDynamicState> dyna_state{linkage,-#if defined(ANDROID)+#if defined(__ANDROID__)ExtendedDynamicState::Disabled,#elif defined(__APPLE__)ExtendedDynamicState::Disabled,@@ -618,7 +618,7 @@ struct Values {Specialization::Scalar};SwitchableSetting<bool> vertex_input_dynamic_state{linkage,-#if defined (ANDROID)+#ifdef __ANDROID__false,#elsetrue,@@ -634,7 +634,7 @@ struct Values {linkage, false, "disable_shader_loop_safety_checks", Category::RendererDebug};Setting<bool> enable_renderdoc_hotkey{linkage, false, "renderdoc_hotkey",Category::RendererDebug};-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)+#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)// Debug override for automatic BCn patching detectionSetting<bool> patch_old_qcom_drivers{linkage, false, "patch_old_qcom_drivers",Category::RendererDebug};@@ -679,7 +679,7 @@ struct Values {Setting<s32> current_user{linkage, 0, "current_user", Category::System};SwitchableSetting<ConsoleMode> use_docked_mode{linkage,-#ifdef ANDROID+#ifdef __ANDROID__ConsoleMode::Handheld,#elseConsoleMode::Docked,diff --git a/src/common/string_util.cpp b/src/common/string_util.cppindex 7bcbe737b6..9543a62343 100644--- a/src/common/string_util.cpp+++ b/src/common/string_util.cpp@@ -1,4 +1,4 @@-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later// SPDX-FileCopyrightText: 2013 Dolphin Emulator Project@@ -18,7 +18,7 @@#include <windows.h>#endif-#ifdef ANDROID+#ifdef __ANDROID__#include <common/fs/fs_android.h>#endif@@ -45,7 +45,7 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _if (full_path.empty())return false;-#ifdef ANDROID+#ifdef __ANDROID__if (full_path[0] != '/') {*_pPath = Common::FS::Android::GetParentDirectory(full_path);*_pFilename = Common::FS::Android::GetFilename(full_path);diff --git a/src/common/swap.h b/src/common/swap.hindex 1cf8a6ba39..c7646ea24d 100644--- a/src/common/swap.h+++ b/src/common/swap.h@@ -1,4 +1,4 @@-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later// SPDX-FileCopyrightText: 2012 PPSSPP Project@@ -10,12 +10,10 @@#pragma once-#if defined(_MSC_VER)#include <cstdlib>-#endif-#include <bit>#include <cstring>#include <type_traits>+#include <bit>#include "common/common_types.h"namespace Common {diff --git a/src/core/debugger/debugger.cpp b/src/core/debugger/debugger.cppindex 3f089b7f80..7924ea0d45 100644--- a/src/core/debugger/debugger.cpp+++ b/src/core/debugger/debugger.cpp@@ -9,7 +9,7 @@#include <boost/asio.hpp>#include <boost/version.hpp>-#if BOOST_VERSION > 108400 && (!defined(_WINDOWS) && !defined(ANDROID)) || defined(YUZU_BOOST_v1)+#if BOOST_VERSION > 108400 && (!defined(_WINDOWS) && !defined(__ANDROID__)) || defined(YUZU_BOOST_v1)#define USE_BOOST_v1#endifdiff --git a/src/core/file_sys/vfs/vfs_real.cpp b/src/core/file_sys/vfs/vfs_real.cppindex ff8808af85..887973d305 100644--- a/src/core/file_sys/vfs/vfs_real.cpp+++ b/src/core/file_sys/vfs/vfs_real.cpp@@ -23,7 +23,7 @@#define stat _stat64#endif-#ifdef ANDROID+#ifdef __ANDROID__#include "common/fs/fs_android.h"#endif@@ -288,7 +288,7 @@ RealVfsFile::~RealVfsFile() {}std::string RealVfsFile::GetName() const {-#ifdef ANDROID+#ifdef __ANDROID__if (path[0] != '/') {return FS::Android::GetFilename(path);}diff --git a/src/core/tools/renderdoc.cpp b/src/core/tools/renderdoc.cppindex 4d91956902..6a6df23432 100644--- a/src/core/tools/renderdoc.cpp+++ b/src/core/tools/renderdoc.cpp@@ -31,7 +31,7 @@ RenderdocAPI::RenderdocAPI() {#elif defined(__HAIKU__)// no rtld on haiku#else-#ifdef ANDROID+#ifdef __ANDROID__static constexpr const char RENDERDOC_LIB[] = "libVkLayer_GLES_RenderDoc.so";#elsestatic constexpr const char RENDERDOC_LIB[] = "librenderdoc.so";diff --git a/src/dynarmic/src/dynarmic/backend/x64/devirtualize.h b/src/dynarmic/src/dynarmic/backend/x64/devirtualize.hindex e6efe010ff..9b618fe71b 100644--- a/src/dynarmic/src/dynarmic/backend/x64/devirtualize.h+++ b/src/dynarmic/src/dynarmic/backend/x64/devirtualize.h@@ -75,7 +75,7 @@ ArgCallback DevirtualizeItanium(mcl::class_type<decltype(mfp)>* this_) {template<auto mfp>ArgCallback Devirtualize(mcl::class_type<decltype(mfp)>* this_) {-#if defined(__APPLE__) || defined(linux) || defined(__linux) || defined(__linux__)+#if defined(__APPLE__) || defined(__linux__)return DevirtualizeItanium<mfp>(this_);#elif defined(__MINGW64__)return DevirtualizeItanium<mfp>(this_);diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cppindex f275727c17..d8ab044b2d 100644--- a/src/frontend_common/config.cpp+++ b/src/frontend_common/config.cpp@@ -1009,7 +1009,7 @@ std::string Config::AdjustOutputString(const std::string& string) {// Windows requires that two forward slashes are used at the start of a path for unmapped// network drives so we have to watch for that here-#ifndef ANDROID+#ifndef __ANDROID__if (string.substr(0, 2) == "//") {boost::replace_all(adjusted_string, "//", "/");adjusted_string.insert(0, "/");diff --git a/src/frontend_common/data_manager.h b/src/frontend_common/data_manager.hindex afb7cb0d2b..b43067d984 100644--- a/src/frontend_common/data_manager.h+++ b/src/frontend_common/data_manager.h@@ -1,8 +1,7 @@-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef DATA_MANAGER_H-#define DATA_MANAGER_H+#pragma once#include "common/common_types.h"#include <string>@@ -21,5 +20,3 @@ std::string ReadableBytesSize(u64 size) noexcept;u64 DataDirSize(DataDir dir);}; // namespace FrontendCommon::DataManager--#endif // DATA_MANAGER_Hdiff --git a/src/frontend_common/firmware_manager.cpp b/src/frontend_common/firmware_manager.cppindex 79af202ed8..c7f1177ee2 100644--- a/src/frontend_common/firmware_manager.cpp+++ b/src/frontend_common/firmware_manager.cpp@@ -13,7 +13,7 @@#include "core/crypto/key_manager.h"#include "frontend_common/content_manager.h"-#ifdef ANDROID+#ifdef __ANDROID__#include <jni.h>#include <common/android/id_cache.h>#include <common/android/android_common.h>@@ -25,7 +25,7 @@ FirmwareManager::InstallKeys(std::string location, std::string extension) {const auto keys_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::KeysDir);-#ifdef ANDROID+#ifdef __ANDROID__JNIEnv *env = Common::Android::GetEnvForThread();jstring jsrc = Common::Android::ToJString(env, location);diff --git a/src/frontend_common/firmware_manager.h b/src/frontend_common/firmware_manager.hindex 94469e9295..4c1297431d 100644--- a/src/frontend_common/firmware_manager.h+++ b/src/frontend_common/firmware_manager.h@@ -1,8 +1,7 @@-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef FIRMWARE_MANAGER_H-#define FIRMWARE_MANAGER_H+#pragma once#include "common/common_types.h"#include "core/core.h"@@ -107,5 +106,3 @@ inline std::pair<Service::Set::FirmwareVersionFormat, Result> GetFirmwareVersion// TODO(crueter): GET AS STRING}--#endifdiff --git a/src/frontend_common/mod_manager.h b/src/frontend_common/mod_manager.hindex 57fdbc3533..79c9e8ade7 100644--- a/src/frontend_common/mod_manager.h+++ b/src/frontend_common/mod_manager.h@@ -5,6 +5,7 @@#include <filesystem>#include <optional>+#include <vector>#include "common/common_types.h"namespace FrontendCommon {diff --git a/src/hid_core/frontend/emulated_controller.cpp b/src/hid_core/frontend/emulated_controller.cppindex ef841e2411..3ebb9133dd 100644--- a/src/hid_core/frontend/emulated_controller.cpp+++ b/src/hid_core/frontend/emulated_controller.cpp@@ -179,7 +179,7 @@ void EmulatedController::LoadDevices() {if (npad_id_type == NpadIdType::Player1 || npad_id_type == NpadIdType::Handheld) {camera_params[1] = Common::ParamPackage{"engine:camera,camera:1"};nfc_params[0] = Common::ParamPackage{"engine:virtual_amiibo,nfc:1"};-#ifndef ANDROID+#ifndef __ANDROID__ring_params[1] = Common::ParamPackage{"engine:joycon,axis_x:100,axis_y:101"};#elseandroid_params = Common::ParamPackage{"engine:android,port:100"};diff --git a/src/input_common/main.cpp b/src/input_common/main.cppindex 5f0a8af3aa..6c8443ff62 100644--- a/src/input_common/main.cpp+++ b/src/input_common/main.cpp@@ -30,7 +30,7 @@#include "input_common/drivers/sdl_driver.h"#endif-#ifdef ANDROID+#ifdef __ANDROID__#include "input_common/drivers/android.h"#endif@@ -85,7 +85,7 @@ struct InputSubsystem::Impl {RegisterEngine("cemuhookudp", udp_client);RegisterEngine("tas", tas_input);RegisterEngine("camera", camera);-#ifdef ANDROID+#ifdef __ANDROID__RegisterEngine("android", android);#endifRegisterEngine("virtual_amiibo", virtual_amiibo);@@ -119,7 +119,7 @@ struct InputSubsystem::Impl {UnregisterEngine(udp_client);UnregisterEngine(tas_input);UnregisterEngine(camera);-#ifdef ANDROID+#ifdef __ANDROID__UnregisterEngine(android);#endifUnregisterEngine(virtual_amiibo);@@ -138,13 +138,13 @@ struct InputSubsystem::Impl {Common::ParamPackage{{"display", "Any"}, {"engine", "any"}},};-#ifndef ANDROID+#ifndef __ANDROID__auto keyboard_devices = keyboard->GetInputDevices();devices.insert(devices.end(), keyboard_devices.begin(), keyboard_devices.end());auto mouse_devices = mouse->GetInputDevices();devices.insert(devices.end(), mouse_devices.begin(), mouse_devices.end());#endif-#ifdef ANDROID+#ifdef __ANDROID__auto android_devices = android->GetInputDevices();devices.insert(devices.end(), android_devices.begin(), android_devices.end());#endif@@ -176,7 +176,7 @@ struct InputSubsystem::Impl {if (engine == mouse->GetEngineName()) {return mouse;}-#ifdef ANDROID+#ifdef __ANDROID__if (engine == android->GetEngineName()) {return android;}@@ -261,7 +261,7 @@ struct InputSubsystem::Impl {if (engine == mouse->GetEngineName()) {return true;}-#ifdef ANDROID+#ifdef __ANDROID__if (engine == android->GetEngineName()) {return true;}@@ -294,7 +294,7 @@ struct InputSubsystem::Impl {void BeginConfiguration() {keyboard->BeginConfiguration();mouse->BeginConfiguration();-#ifdef ANDROID+#ifdef __ANDROID__android->BeginConfiguration();#endif#ifdef ENABLE_LIBUSB@@ -310,7 +310,7 @@ struct InputSubsystem::Impl {void EndConfiguration() {keyboard->EndConfiguration();mouse->EndConfiguration();-#ifdef ANDROID+#ifdef __ANDROID__android->EndConfiguration();#endif#ifdef ENABLE_LIBUSB@@ -355,7 +355,7 @@ struct InputSubsystem::Impl {std::shared_ptr<Joycons> joycon;#endif-#ifdef ANDROID+#ifdef __ANDROID__std::shared_ptr<Android> android;#endif};@@ -412,7 +412,7 @@ const Camera* InputSubsystem::GetCamera() const {return impl->camera.get();}-#ifdef ANDROID+#ifdef __ANDROID__Android* InputSubsystem::GetAndroid() {return impl->android.get();}diff --git a/src/qt_common/abstract/frontend.h b/src/qt_common/abstract/frontend.hindex 9b70f6849e..48c7c6edd0 100644--- a/src/qt_common/abstract/frontend.h+++ b/src/qt_common/abstract/frontend.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef FRONTEND_H-#define FRONTEND_H+#pragma once#include <QGuiApplication>#include "qt_common/qt_common.h"@@ -114,4 +113,3 @@ const QString GetTextInput(const QString& title = QString(), const QString& captconst QString& defaultText = QString());} // namespace QtCommon::Frontend-#endif // FRONTEND_Hdiff --git a/src/qt_common/qt_common.h b/src/qt_common/qt_common.hindex 2109774506..ea8e3f73a2 100644--- a/src/qt_common/qt_common.h+++ b/src/qt_common/qt_common.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef QT_COMMON_H-#define QT_COMMON_H+#pragma once#include <memory>#include <QWindow>@@ -62,4 +61,3 @@ const QString tr(const std::string& str);std::filesystem::path GetEdenCommand();} // namespace QtCommon-#endifdiff --git a/src/qt_common/util/applet.h b/src/qt_common/util/applet.hindex f88aa066b2..41294466da 100644--- a/src/qt_common/util/applet.h+++ b/src/qt_common/util/applet.h@@ -1,9 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef QT_APPLET_UTIL_H-#define QT_APPLET_UTIL_H+#pragma once// TODOnamespace QtCommon::Applets {}-#endif // QT_APPLET_UTIL_Hdiff --git a/src/qt_common/util/content.h b/src/qt_common/util/content.hindex 452764ef54..6b0cbb5965 100644--- a/src/qt_common/util/content.h+++ b/src/qt_common/util/content.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef QT_CONTENT_UTIL_H-#define QT_CONTENT_UTIL_H+#pragma once#include <QObject>#include "common/common_types.h"@@ -63,4 +62,3 @@ void configureFilesystemProvider(const std::string& filepath);// Profiles //void FixProfiles();} // namespace QtCommon::Content-#endif // QT_CONTENT_UTIL_Hdiff --git a/src/qt_common/util/fs.h b/src/qt_common/util/fs.hindex 5ab59e2a45..8f42beaaa3 100644--- a/src/qt_common/util/fs.h+++ b/src/qt_common/util/fs.h@@ -1,12 +1,12 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later+#pragma once+#include <filesystem>#include <optional>#include "common/common_types.h"-#pragma once-namespace QtCommon::FS {void LinkRyujinx(std::filesystem::path& from, std::filesystem::path& to);diff --git a/src/qt_common/util/game.h b/src/qt_common/util/game.hindex 9a61bb9349..8722574ed7 100644--- a/src/qt_common/util/game.h+++ b/src/qt_common/util/game.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef QT_GAME_UTIL_H-#define QT_GAME_UTIL_H+#pragma once#include <QObject>#include <QStandardPaths>@@ -78,5 +77,3 @@ void CreateHomeMenuShortcut(ShortcutTarget target);[[nodiscard]] bool SaveIconToFile(const std::filesystem::path& icon_path, const QImage& image);} // namespace QtCommon::Game--#endif // QT_GAME_UTIL_Hdiff --git a/src/qt_common/util/meta.h b/src/qt_common/util/meta.hindex ae6dbc49d8..d408b5759c 100644--- a/src/qt_common/util/meta.h+++ b/src/qt_common/util/meta.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef QT_META_H-#define QT_META_H+#pragma once#include <QObject>@@ -12,4 +11,3 @@ namespace QtCommon::Meta {void RegisterMetaTypes();} // namespace QtCommon::Meta-#endif // QT_META_Hdiff --git a/src/qt_common/util/path.h b/src/qt_common/util/path.hindex aff0009f34..ba77625226 100644--- a/src/qt_common/util/path.h+++ b/src/qt_common/util/path.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef QT_PATH_UTIL_H-#define QT_PATH_UTIL_H+#pragma once#include <QObject>#include "common/common_types.h"@@ -10,5 +9,3 @@namespace QtCommon::Path {bool OpenShaderCache(u64 program_id, QObject* parent);}--#endif // QT_PATH_UTIL_Hdiff --git a/src/qt_common/util/rom.h b/src/qt_common/util/rom.hindex 5ceadaf46b..6ea5082082 100644--- a/src/qt_common/util/rom.h+++ b/src/qt_common/util/rom.h@@ -1,16 +1,11 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef QT_ROM_UTIL_H-#define QT_ROM_UTIL_H+#pragma once#include <cstddef>#include "qt_common/qt_common.h"namespace QtCommon::ROM {--bool RomFSRawCopy(size_t total_size, size_t& read_size, QtProgressCallback callback,- const FileSys::VirtualDir& src, const FileSys::VirtualDir& dest, bool full);-+bool RomFSRawCopy(size_t total_size, size_t& read_size, QtProgressCallback callback, const FileSys::VirtualDir& src, const FileSys::VirtualDir& dest, bool full);}-#endif // QT_ROM_UTIL_Hdiff --git a/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_convert.cppindex 115e9ed4ed..9fa84cceb7 100644--- a/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp+++ b/src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp@@ -151,7 +151,7 @@ Id EmitConvertU32U64(EmitContext& ctx, Id value) {}Id EmitConvertF16F32(EmitContext& ctx, Id value) {-#ifdef ANDROID+#ifdef __ANDROID__return ctx.OpFConvert(ctx.F16[1], value);#elseconst auto result = ctx.OpFConvert(ctx.F16[1], value);diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_image.cppindex ad98973e29..df4da81356 100644--- a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp+++ b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp@@ -506,7 +506,7 @@ Id EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value&Id result = Emit(&EmitContext::OpImageSparseSampleExplicitLod,&EmitContext::OpImageSampleExplicitLod, ctx, inst, ctx.F32[4],Texture(ctx, info, index), coords, operands.Mask(), operands.Span());-#ifdef ANDROID+#ifdef __ANDROID__if (Settings::values.fix_bloom_effects.GetValue()) {result = ctx.OpVectorTimesScalar(ctx.F32[4], result, ctx.Const(0.98f));}diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.hindex 8c36a40377..0738eaeec3 100644--- a/src/video_core/buffer_cache/buffer_cache.h+++ b/src/video_core/buffer_cache/buffer_cache.h@@ -801,7 +801,7 @@ void BufferCache<P>::UpdateVertexBufferSlot(u32 index, const Binding& binding) {template <class P>void BufferCache<P>::BindHostVertexBuffers() {-#ifdef ANDROID+#ifdef __ANDROID__const bool use_optimized_vertex_buffers = Settings::values.use_optimized_vertex_buffers.GetValue();#elseconstexpr bool use_optimized_vertex_buffers = true;diff --git a/src/video_core/gpu_logging/freedreno_debug.cpp b/src/video_core/gpu_logging/freedreno_debug.cppindex 8b65bd0cd5..e01c154031 100644--- a/src/video_core/gpu_logging/freedreno_debug.cpp+++ b/src/video_core/gpu_logging/freedreno_debug.cpp@@ -1,7 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifdef ANDROID+#ifdef __ANDROID__#include "video_core/gpu_logging/freedreno_debug.h"#include "common/logging.h"@@ -49,4 +49,4 @@ std::string FreedrenoDebugger::GetBreadcrumbs() {} // namespace GPU::Logging::Freedreno-#endif // ANDROID+#endif // __ANDROID__diff --git a/src/video_core/gpu_logging/freedreno_debug.h b/src/video_core/gpu_logging/freedreno_debug.hindex feb57a0b2a..7e4f812f46 100644--- a/src/video_core/gpu_logging/freedreno_debug.h+++ b/src/video_core/gpu_logging/freedreno_debug.h@@ -3,7 +3,7 @@#pragma once-#ifdef ANDROID+#ifdef __ANDROID__#include <string>@@ -29,4 +29,4 @@ private:} // namespace GPU::Logging::Freedreno-#endif // ANDROID+#endif // __ANDROID__diff --git a/src/video_core/host1x/ffmpeg.cpp b/src/video_core/host1x/ffmpeg.cppindex 80e48692f7..88df6695d8 100644--- a/src/video_core/host1x/ffmpeg.cpp+++ b/src/video_core/host1x/ffmpeg.cpp@@ -28,7 +28,7 @@ namespace {constexpr AVPixelFormat PreferredGpuFormat = AV_PIX_FMT_NV12;constexpr AVPixelFormat PreferredCpuFormat = AV_PIX_FMT_YUV420P;constexpr std::array PreferredGpuDecoders = {-#if defined (_WIN32)+#if defined(_WIN32)AV_HWDEVICE_TYPE_CUDA,AV_HWDEVICE_TYPE_D3D11VA,AV_HWDEVICE_TYPE_DXVA2,@@ -39,7 +39,7 @@ constexpr std::array PreferredGpuDecoders = {AV_HWDEVICE_TYPE_DRM,#elif defined(__APPLE__)AV_HWDEVICE_TYPE_VIDEOTOOLBOX,-#elif defined(ANDROID)+#elif defined(__ANDROID__)AV_HWDEVICE_TYPE_MEDIACODEC,#elif defined(__unix__)AV_HWDEVICE_TYPE_CUDA,diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cppindex 5345bdc306..23bfbceccb 100644--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp@@ -45,7 +45,7 @@#include "video_core/vulkan_common/vulkan_wrapper.h"#include "video_core/gpu_logging/gpu_logging.h"-#ifdef ANDROID+#ifdef __ANDROID__#include "../../android/app/src/main/jni/android_settings.h"#endif@@ -328,7 +328,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span<const Shader::IR::Program> programsize_t GetTotalPipelineWorkers() {const size_t max_core_threads =std::max<size_t>(static_cast<size_t>(std::thread::hardware_concurrency()), 2ULL) - 1ULL;-#ifdef ANDROID+#ifdef __ANDROID__const int configured = AndroidSettings::values.pipeline_worker_count.GetValue();const int clamped = std::clamp(configured, 4, 8);const size_t desired = static_cast<size_t>(clamped);diff --git a/src/video_core/renderer_vulkan/vk_present_manager.cpp b/src/video_core/renderer_vulkan/vk_present_manager.cppindex 010bc9b7d4..53c3f6759f 100644--- a/src/video_core/renderer_vulkan/vk_present_manager.cpp+++ b/src/video_core/renderer_vulkan/vk_present_manager.cpp@@ -309,7 +309,7 @@ void PresentManager::CopyToSwapchain(Frame* frame) {try {// Recreate surface and swapchain if needed.if (requires_recreation) {-#ifdef ANDROID+#ifdef __ANDROID__surface = CreateSurface(instance, render_window.GetWindowInfo());#endifRecreateSwapchain(frame);diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cppindex 4af78c4ac6..35b7aed552 100644--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp@@ -928,13 +928,13 @@ void RasterizerVulkan::LoadDiskResources(u64 title_id, std::stop_token stop_load}void RasterizerVulkan::FlushWork() {-#ifdef ANDROID+#ifdef __ANDROID__static constexpr u32 DRAWS_TO_DISPATCH = 512;static constexpr u32 CHECK_MASK = 3;#elsestatic constexpr u32 DRAWS_TO_DISPATCH = 4096;static constexpr u32 CHECK_MASK = 7;-#endif // ANDROID+#endif // __ANDROID__static_assert(DRAWS_TO_DISPATCH % (CHECK_MASK + 1) == 0);if ((++draw_counter & CHECK_MASK) != CHECK_MASK) {diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cppindex 7e31f9cf67..fdbad16721 100644--- a/src/video_core/renderer_vulkan/vk_swapchain.cpp+++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp@@ -288,7 +288,7 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) {.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE,.queueFamilyIndexCount = 0,.pQueueFamilyIndices = nullptr,-#ifdef ANDROID+#ifdef __ANDROID__// On Android, do not allow surface rotation to deviate from the frontend..preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR,#else@@ -313,7 +313,7 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) {swapchain_ci.imageFormat, // Base format MUST be firstVK_FORMAT_B8G8R8A8_UNORM,VK_FORMAT_B8G8R8A8_SRGB,-#ifdef ANDROID+#ifdef __ANDROID__VK_FORMAT_R8G8B8A8_UNORM, // Android may use RGBAVK_FORMAT_R8G8B8A8_SRGB,#endif@@ -338,7 +338,7 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) {images = swapchain.GetImages();image_count = static_cast<u32>(images.size());-#ifdef ANDROID+#ifdef __ANDROID__// Android is already ordered the same as Switch.image_view_format = VK_FORMAT_R8G8B8A8_UNORM;#elsediff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cppindex 54183be12c..095908b6cf 100644--- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp+++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp@@ -1,10 +1,10 @@-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project// SPDX-License-Identifier: GPL-2.0-or-later-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)+#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)#include <adrenotools/driver.h>#endif@@ -20,7 +20,7 @@ namespace Vulkan {using namespace Common::Literals;TurboMode::TurboMode(const vk::Instance& instance, const vk::InstanceDispatch& dld)-#ifndef ANDROID+#ifndef __ANDROID__: m_device{CreateDevice(instance, dld, VK_NULL_HANDLE)}, m_allocator{m_device}#endif{@@ -40,7 +40,7 @@ void TurboMode::QueueSubmitted() {}void TurboMode::Run(std::stop_token stop_token) {-#ifndef ANDROID+#ifndef __ANDROID__auto& dld = m_device.GetLogical();// Allocate buffer. 2MiB should be sufficient.@@ -154,7 +154,7 @@ void TurboMode::Run(std::stop_token stop_token) {#endifwhile (!stop_token.stop_requested()) {-#ifdef ANDROID+#ifdef __ANDROID__#ifdef ARCHITECTURE_arm64adrenotools_set_turbo(true);#endif@@ -232,7 +232,7 @@ void TurboMode::Run(std::stop_token stop_token) {std::chrono::milliseconds{100};});}-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)+#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)adrenotools_set_turbo(false);#endif}diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.h b/src/video_core/renderer_vulkan/vk_turbo_mode.hindex 9341c98671..6f95cf5e74 100644--- a/src/video_core/renderer_vulkan/vk_turbo_mode.h+++ b/src/video_core/renderer_vulkan/vk_turbo_mode.h@@ -1,3 +1,6 @@+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project+// SPDX-License-Identifier: GPL-3.0-or-later+// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project// SPDX-License-Identifier: GPL-2.0-or-later@@ -23,7 +26,7 @@ public:private:void Run(std::stop_token stop_token);-#ifndef ANDROID+#ifndef __ANDROID__Device m_device;MemoryAllocator m_allocator;#endifdiff --git a/src/video_core/smaa_area_tex.h b/src/video_core/smaa_area_tex.hindex 40d0941c26..aa4000d315 100644--- a/src/video_core/smaa_area_tex.h+++ b/src/video_core/smaa_area_tex.h@@ -1,3 +1,6 @@+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project+// SPDX-License-Identifier: GPL-3.0-or-later+// SPDX-FileCopyrightText: 2013 Jorge Jimenez ([email protected])// SPDX-FileCopyrightText: 2013 Jose I. Echevarria ([email protected])// SPDX-FileCopyrightText: 2013 Belen Masia ([email protected])@@ -5,8 +8,7 @@// SPDX-FileCopyrightText: 2013 Diego Gutierrez ([email protected])// SPDX-License-Identifier: MIT-#ifndef AREATEX_H-#define AREATEX_H+#pragma once#define AREATEX_WIDTH 160#define AREATEX_HEIGHT 560@@ -11219,5 +11221,3 @@ static const unsigned char areaTexBytes[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};--#endifdiff --git a/src/video_core/smaa_search_tex.h b/src/video_core/smaa_search_tex.hindex 61939e2046..3a74ab0a32 100644--- a/src/video_core/smaa_search_tex.h+++ b/src/video_core/smaa_search_tex.h@@ -1,3 +1,6 @@+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project+// SPDX-License-Identifier: GPL-3.0-or-later+// SPDX-FileCopyrightText: 2013 Jorge Jimenez ([email protected])// SPDX-FileCopyrightText: 2013 Jose I. Echevarria ([email protected])// SPDX-FileCopyrightText: 2013 Belen Masia ([email protected])@@ -5,8 +8,7 @@// SPDX-FileCopyrightText: 2013 Diego Gutierrez ([email protected])// SPDX-License-Identifier: MIT-#ifndef SEARCHTEX_H-#define SEARCHTEX_H+#pragma once#define SEARCHTEX_WIDTH 64#define SEARCHTEX_HEIGHT 16@@ -84,5 +86,3 @@ static const unsigned char searchTexBytes[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,};--#endifdiff --git a/src/video_core/vulkan_common/vulkan_debug_callback.cpp b/src/video_core/vulkan_common/vulkan_debug_callback.cppindex d1bd009c8f..8d59a74a30 100644--- a/src/video_core/vulkan_common/vulkan_debug_callback.cpp+++ b/src/video_core/vulkan_common/vulkan_debug_callback.cpp@@ -27,7 +27,7 @@ VkBool32 DebugUtilCallback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,[[maybe_unused]] void* user_data) {// Skip logging known false-positive validation errorsswitch (static_cast<u32>(data->messageIdNumber)) {-#ifdef ANDROID+#ifdef __ANDROID__case 0xbf9cf353u: // VUID-vkCmdBindVertexBuffers2-pBuffers-04111// The below are due to incorrect reporting of extendedDynamicStatecase 0x1093bebbu: // VUID-vkCmdSetCullMode-None-03384diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cppindex 59985067db..bb80895b97 100644--- a/src/video_core/vulkan_common/vulkan_device.cpp+++ b/src/video_core/vulkan_common/vulkan_device.cpp@@ -26,7 +26,7 @@#include "video_core/vulkan_common/vulkan_wrapper.h"#include "video_core/gpu_logging/gpu_logging.h"-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)+#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)#include <adrenotools/bcenabler.h>#include <android/api-level.h>#endif@@ -294,7 +294,7 @@ ankerl::unordered_dense::map<VkFormat, VkFormatProperties> GetFormatProperties(vreturn format_properties;}-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)+#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)void OverrideBcnFormats(ankerl::unordered_dense::map<VkFormat, VkFormatProperties>& format_properties) {// These properties are extracted from Adreno driver 512.687.0constexpr VkFormatFeatureFlags tiling_features{VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |@@ -504,7 +504,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHRfeatures.shader_atomic_int64.shaderSharedInt64Atomics = false;features.features.shaderInt64 = false;-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)+#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)// BCn patching only safe on Android 9+ (API 28+). Older versions crash on driver load.const auto major = (properties.properties.driverVersion >> 24) << 2;const auto minor = (properties.properties.driverVersion >> 12) & 0xFFFU;diff --git a/src/video_core/vulkan_common/vulkan_library.cpp b/src/video_core/vulkan_common/vulkan_library.cppindex 271b622e65..d174a9d3c8 100644--- a/src/video_core/vulkan_common/vulkan_library.cpp+++ b/src/video_core/vulkan_common/vulkan_library.cpp@@ -16,7 +16,7 @@ namespace Vulkan {std::shared_ptr<Common::DynamicLibrary> OpenLibrary([[maybe_unused]] Core::Frontend::GraphicsContext* context) {LOG_DEBUG(Render_Vulkan, "Looking for a Vulkan library");-#if defined(ANDROID) && defined(ARCHITECTURE_arm64)+#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)// Android manages its Vulkan driver from the frontend.return context->GetDriverLibrary();#elsediff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.hindex 860cdff20e..87870893c5 100644--- a/src/video_core/vulkan_common/vulkan_wrapper.h+++ b/src/video_core/vulkan_common/vulkan_wrapper.h@@ -453,7 +453,7 @@ public:return handle != Type{};}-#ifndef ANDROID+#ifndef __ANDROID__/*** Releases ownership of the managed handle.* The caller is responsible for managing the lifetime of the returned handle.@@ -535,7 +535,7 @@ public:return handle != Type{};}-#ifndef ANDROID+#ifndef __ANDROID__/*** Releases ownership of the managed handle.* The caller is responsible for managing the lifetime of the returned handle.diff --git a/src/yuzu/data_dialog.h b/src/yuzu/data_dialog.hindex 2915f00848..b780debdff 100644--- a/src/yuzu/data_dialog.h+++ b/src/yuzu/data_dialog.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef DATA_DIALOG_H-#define DATA_DIALOG_H+#pragma once#include <QDialog>#include "frontend_common/data_manager.h"@@ -47,5 +46,3 @@ private:std::optional<std::string> selectProfile();};--#endif // DATA_DIALOG_Hdiff --git a/src/yuzu/migration_dialog.h b/src/yuzu/migration_dialog.hindex a2a2c80358..1cd0f75760 100644--- a/src/yuzu/migration_dialog.h+++ b/src/yuzu/migration_dialog.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef MIGRATION_DIALOG_H-#define MIGRATION_DIALOG_H+#pragma once#include <QHBoxLayout>#include <QMessageBox>@@ -29,5 +28,3 @@ private:QAbstractButton* m_clickedButton;};--#endif // MIGRATION_DIALOG_Hdiff --git a/src/yuzu/migration_worker.h b/src/yuzu/migration_worker.hindex 42abedb9c8..0a8a5b8275 100644--- a/src/yuzu/migration_worker.h+++ b/src/yuzu/migration_worker.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef MIGRATION_WORKER_H-#define MIGRATION_WORKER_H+#pragma once#include <QObject>#include "common/fs/path_util.h"@@ -73,5 +72,3 @@ private:MigrationStrategy strategy;QString success_text = tr("Data was migrated successfully.");};--#endif // MIGRATION_WORKER_Hdiff --git a/src/yuzu/ryujinx_dialog.h b/src/yuzu/ryujinx_dialog.hindex c067499cc1..e668cf5ca0 100644--- a/src/yuzu/ryujinx_dialog.h+++ b/src/yuzu/ryujinx_dialog.h@@ -1,8 +1,7 @@// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project// SPDX-License-Identifier: GPL-3.0-or-later-#ifndef RYUJINX_DIALOG_H-#define RYUJINX_DIALOG_H+#pragma once#include <filesystem>#include <QDialog>@@ -28,5 +27,3 @@ private:std::filesystem::path m_eden;std::filesystem::path m_ryu;};--#endif // RYUJINX_DIALOG_Hdiff --git a/tools/cpp-lint.sh b/tools/cpp-lint.shnew file mode 100755index 0000000000..4c5a6e10dc--- /dev/null+++ b/tools/cpp-lint.sh@@ -0,0 +1,55 @@+#!/bin/sh -ex++# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project+# SPDX-License-Identifier: GPL-3.0-or-later++# tools/../+ROOTDIR=$(CDPATH='' cd -- "$(dirname -- "$0")/../" && pwd)+BUILD_DIR="$ROOTDIR"/build+SRC_DIR="$ROOTDIR"/src++die() {+ echo "-- $*" >&2+ exit 1+}++usage() {+ cat <<EOF+Usage: $0 [command]++Dumb script that serves as a ad-hoc cpp-linter++Commands:+ once Check for #pragma once prescence in header files+ osdef Finds OS defines that are not recommended to use.+ inchk Check includes being valid/toolchain not being stupid+EOF+}++while :; do+ case "$1" in+ once)+ find "$SRC_DIR" -type f -name "*.h" -exec grep -L "#pragma once" {} ++ break+ ;;+ osdef)+ # not recommended macros+ PATTERN="ANDROID\|_WIN64\|__linux\|__unix\|APPLE\|__APPLE"+ strings=("ANDROID" "_WIN64" "__linux" "__unix" "APPLE" "__APPLE" "linux" "unix")+ for item in "${strings[@]}"; do+ PATTERN="$PATTERN\|ifdef $item\|($item)"+ done+ # if statements for macros that shouldn't be if+ strings=("_WIN32" "_AIX" "__managarm__" "__unix__" "__linux__" "__FreeBSD__" "__NetBSD__" \+ "__OpenBSD__" "__DragonFly__" "__redox__" "__HAIKU__" "__OHOS__" "__FIREOS__")+ for item in "${strings[@]}"; do+ PATTERN="$PATTERN\|if $item"+ done+ find "$SRC_DIR" -type f -name "*.h" -exec grep -nw "$PATTERN" {} + || echo+ break+ ;;+ *) usage ;;+ esac++ shift+done