From 280d0e7f8ddbd7a67d0771ed2b5d9e22f205cd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 17 Sep 2025 08:37:30 +0200 Subject: [PATCH 1/5] MaterialAsset: Fix shadowed field --- Source/Core/VideoCommon/Assets/MaterialAsset.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/Assets/MaterialAsset.cpp b/Source/Core/VideoCommon/Assets/MaterialAsset.cpp index 5f7b158334..5f5c97a9f1 100644 --- a/Source/Core/VideoCommon/Assets/MaterialAsset.cpp +++ b/Source/Core/VideoCommon/Assets/MaterialAsset.cpp @@ -222,7 +222,7 @@ bool MaterialData::FromJson(const CustomAssetLibrary::AssetID& asset_id, const picojson::object& json, MaterialData* data) { const auto parse_properties = [&](const char* name, - std::vector* properties) -> bool { + std::vector* material_properties) -> bool { const auto properties_iter = json.find(name); if (properties_iter == json.end()) { @@ -237,7 +237,7 @@ bool MaterialData::FromJson(const CustomAssetLibrary::AssetID& asset_id, } const auto& properties_array = properties_iter->second.get(); - if (!ParseMaterialProperties(asset_id, properties_array, properties)) + if (!ParseMaterialProperties(asset_id, properties_array, material_properties)) return false; return true; }; From 33152740d0683865504a3d7882470522ef22ad3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 29 Oct 2025 10:32:12 +0100 Subject: [PATCH 2/5] CustomPipeline.cpp: Fix unused-function warning This whole file is apparently going away soon. --- .../Runtime/CustomPipeline.cpp | 138 ------------------ 1 file changed, 138 deletions(-) diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp index d335ed4adb..aa392f0a96 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp @@ -31,144 +31,6 @@ bool IsBuiltInMacro(std::string_view value) return Common::Contains(built_in, value); } -std::vector GlobalConflicts(std::string_view source) -{ - std::string_view last_identifier = ""; - std::vector global_result; - u32 scope = 0; - for (u32 i = 0; i < source.size(); i++) - { - // If we're out of global scope, we don't care - // about any of the details - if (scope > 0) - { - if (source[i] == '{') - { - scope++; - } - else if (source[i] == '}') - { - scope--; - } - continue; - } - - const auto parse_identifier = [&] { - const u32 start = i; - for (; i < source.size(); i++) - { - if (!Common::IsAlpha(source[i]) && source[i] != '_' && !std::isdigit(source[i])) - break; - } - u32 end = i; - i--; // unwind - return source.substr(start, end - start); - }; - - if (Common::IsAlpha(source[i]) || source[i] == '_') - { - const std::string_view identifier = parse_identifier(); - if (IsQualifier(identifier)) - continue; - if (IsBuiltInMacro(identifier)) - continue; - last_identifier = identifier; - } - else if (source[i] == '#') - { - const auto parse_until_end_of_preprocessor = [&] { - bool continue_until_next_newline = false; - for (; i < source.size(); i++) - { - if (source[i] == '\n') - { - if (continue_until_next_newline) - continue_until_next_newline = false; - else - break; - } - else if (source[i] == '\\') - { - continue_until_next_newline = true; - } - } - }; - i++; - const std::string_view identifier = parse_identifier(); - if (identifier == "define") - { - i++; - // skip whitespace - while (source[i] == ' ') - { - i++; - } - global_result.emplace_back(parse_identifier()); - parse_until_end_of_preprocessor(); - } - else - { - parse_until_end_of_preprocessor(); - } - } - else if (source[i] == '{') - { - scope++; - } - else if (source[i] == '(') - { - // Unlikely the user will be using layouts but... - if (last_identifier == "layout") - continue; - - // Since we handle equality, we can assume the identifier - // before '(' is a function definition - global_result.emplace_back(last_identifier); - } - else if (source[i] == '=') - { - global_result.emplace_back(last_identifier); - i++; - for (; i < source.size(); i++) - { - if (source[i] == ';') - break; - } - } - else if (source[i] == '/') - { - if ((i + 1) >= source.size()) - continue; - - if (source[i + 1] == '/') - { - // Go to end of line... - for (; i < source.size(); i++) - { - if (source[i] == '\n') - break; - } - } - else if (source[i + 1] == '*') - { - // Multiline, look for first '*/' - for (; i < source.size(); i++) - { - if (source[i] == '/' && source[i - 1] == '*') - break; - } - } - } - } - - // Sort the conflicts from largest to smallest string - // this way we can ensure smaller strings that are a substring - // of the larger string are able to be replaced appropriately - std::ranges::sort(global_result, std::ranges::greater{}, - [](const std::string& s) { return s.size(); }); - return global_result; -} - } // namespace void CustomPipeline::UpdatePixelData(std::shared_ptr, From 2383e68fd804e5f7050d658df37e2f18110d1719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 29 Oct 2025 10:35:16 +0100 Subject: [PATCH 3/5] x64Emitter: Fix missing-declarations warning --- Source/Core/Common/x64Emitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp index 46b117a87f..0a122e1121 100644 --- a/Source/Core/Common/x64Emitter.cpp +++ b/Source/Core/Common/x64Emitter.cpp @@ -1862,7 +1862,7 @@ void XEmitter::WriteVEXOp4(u8 opPrefix, u16 op, X64Reg regOp1, X64Reg regOp2, co Write8((u8)regOp3 << 4); } -void CheckAVXSupport() +static void CheckAVXSupport() { if (!cpu_info.bAVX) PanicAlertFmt("Trying to use AVX on a system that doesn't support it. Bad programmer."); From b66b2f71afc020a4ada0017a1de91d0379a1402f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 29 Oct 2025 10:42:43 +0100 Subject: [PATCH 4/5] GameConfigEdit: Fix unused-result warning --- Source/Core/DolphinQt/Config/GameConfigEdit.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/Config/GameConfigEdit.cpp b/Source/Core/DolphinQt/Config/GameConfigEdit.cpp index 8c93f84263..3c49fcae05 100644 --- a/Source/Core/DolphinQt/Config/GameConfigEdit.cpp +++ b/Source/Core/DolphinQt/Config/GameConfigEdit.cpp @@ -257,7 +257,13 @@ void GameConfigEdit::OpenExternalEditor() if (m_read_only) return; - file.open(QIODevice::WriteOnly); + if (!file.open(QIODevice::WriteOnly)) + { + ModalMessageBox::warning(this, tr("Error"), + tr("Failed to create the configuration file:\n%1").arg(m_path)); + return; + } + file.close(); } From 5c12677705f06208970b1589c47c5d6c2167ac82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 29 Oct 2025 10:47:39 +0100 Subject: [PATCH 5/5] OnScreenDisplayPane: Fix unused-variable warning This is used in AdvancedPane and was seemingly accidentally copied over --- Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp index 7c279d4437..53f1888709 100644 --- a/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp +++ b/Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp @@ -186,10 +186,6 @@ void OnScreenDisplayPane::AddDescriptions() "but the slower it will be to update." "

If unsure, leave this " "at 1000ms."); - static const char TR_LOG_RENDERTIME_DESCRIPTION[] = QT_TR_NOOP( - "Logs the render time of every frame to User/Logs/render_time.txt.

Use this " - "feature to measure Dolphin's performance.

If " - "unsure, leave this unchecked."); static const char TR_SHOW_NETPLAY_PING_DESCRIPTION[] = QT_TR_NOOP( "Shows the player's maximum ping while playing on "