From 6b3fa2983564f889ee6b35bde6f4e6877bf6ad9c Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Mon, 31 Jul 2023 17:00:31 +0200 Subject: [PATCH] early-access version 3783 --- README.md | 2 +- .../time/time_zone_content_manager.cpp | 17 +++++++++-------- .../service/time/time_zone_content_manager.h | 2 ++ .../vulkan_common/vulkan_device.cpp | 8 ++++++++ src/yuzu/configuration/config.cpp | 19 ++++++++++++------- src/yuzu/configuration/shared_widget.cpp | 6 ++++-- 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9e9f6d255..f195ec56c 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3782. +This is the source code for early-access 3783. ## Legal Notice diff --git a/src/core/hle/service/time/time_zone_content_manager.cpp b/src/core/hle/service/time/time_zone_content_manager.cpp index ea5135ce6..caff1b973 100755 --- a/src/core/hle/service/time/time_zone_content_manager.cpp +++ b/src/core/hle/service/time/time_zone_content_manager.cpp @@ -3,6 +3,7 @@ #include #include +#include #include "common/logging/log.h" #include "common/settings.h" @@ -46,14 +47,14 @@ static FileSys::VirtualDir GetTimeZoneBinary(Core::System& system) { return FileSys::ExtractRomFS(romfs); } -static std::vector BuildLocationNameCache(Core::System& system) { - const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)}; - if (!extracted_romfs) { +static std::vector BuildLocationNameCache( + const FileSys::VirtualDir& time_zone_binary) { + if (!time_zone_binary) { LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); return {}; } - const FileSys::VirtualFile binary_list{extracted_romfs->GetFile("binaryList.txt")}; + const FileSys::VirtualFile binary_list{time_zone_binary->GetFile("binaryList.txt")}; if (!binary_list) { LOG_ERROR(Service_Time, "{:016X} has no file binaryList.txt!", time_zone_binary_titleid); return {}; @@ -73,7 +74,8 @@ static std::vector BuildLocationNameCache(Core::System& system) { } TimeZoneContentManager::TimeZoneContentManager(Core::System& system_) - : system{system_}, location_name_cache{BuildLocationNameCache(system)} {} + : system{system_}, time_zone_binary{GetTimeZoneBinary(system)}, + location_name_cache{BuildLocationNameCache(time_zone_binary)} {} void TimeZoneContentManager::Initialize(TimeManager& time_manager) { const auto timezone_setting = @@ -112,13 +114,12 @@ Result TimeZoneContentManager::GetTimeZoneInfoFile(const std::string& location_n return ERROR_TIME_NOT_FOUND; } - const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)}; - if (!extracted_romfs) { + if (!time_zone_binary) { LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); return ERROR_TIME_NOT_FOUND; } - const FileSys::VirtualDir zoneinfo_dir{extracted_romfs->GetSubdirectory("zoneinfo")}; + const FileSys::VirtualDir zoneinfo_dir{time_zone_binary->GetSubdirectory("zoneinfo")}; if (!zoneinfo_dir) { LOG_ERROR(Service_Time, "{:016X} has no directory zoneinfo!", time_zone_binary_titleid); return ERROR_TIME_NOT_FOUND; diff --git a/src/core/hle/service/time/time_zone_content_manager.h b/src/core/hle/service/time/time_zone_content_manager.h index 844e40f50..b91214b55 100755 --- a/src/core/hle/service/time/time_zone_content_manager.h +++ b/src/core/hle/service/time/time_zone_content_manager.h @@ -6,6 +6,7 @@ #include #include +#include "core/file_sys/vfs_types.h" #include "core/hle/service/time/time_zone_manager.h" namespace Core { @@ -41,6 +42,7 @@ private: Core::System& system; TimeZoneManager time_zone_manager; + const FileSys::VirtualDir time_zone_binary; const std::vector location_name_cache; }; diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index a120d2373..116e13149 100755 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -554,6 +554,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR } sets_per_pool = 64; + if (extensions.extended_dynamic_state3 && is_amd_driver && + !features.shader_float16_int8.shaderFloat16 && + properties.properties.driverVersion >= VK_MAKE_API_VERSION(0, 2, 0, 258)) { + LOG_WARNING(Render_Vulkan, "AMD GCN4 has broken extendedDynamicState3ColorBlendEquation"); + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; + dynamic_state3_blending = false; + } if (is_amd_driver) { // AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2. sets_per_pool = 96; diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 5eb051e0d..b39843dd5 100755 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -1090,6 +1090,7 @@ void Config::SaveUIValues() { qt_config->beginGroup(QStringLiteral("UI")); WriteCategory(Settings::Category::Ui); + WriteCategory(Settings::Category::UiGeneral); WriteSetting(QStringLiteral("theme"), UISettings::values.theme, QString::fromUtf8(UISettings::themes[static_cast(default_theme)].second)); @@ -1256,23 +1257,27 @@ void Config::WriteCategory(Settings::Category category) { } void Config::ReadSettingGeneric(Settings::BasicSetting* const setting) { - if (!setting->Save()) { + if (!setting->Save() || (!setting->Switchable() && !global)) { return; } const QString name = QString::fromStdString(setting->GetLabel()); const auto default_value = QVariant::fromValue(QString::fromStdString(setting->DefaultToString())); - if (setting->Switchable()) { - const bool use_global = - qt_config->value(name + QStringLiteral("/use_global"), true).value(); + bool use_global = true; + if (setting->Switchable() && !global) { + use_global = qt_config->value(name + QStringLiteral("/use_global"), true).value(); setting->SetGlobal(use_global); + } - if (global || !use_global) { + if (global || !use_global) { + const bool is_default = ReadSetting(name + QStringLiteral("/default"), true).value(); + if (!is_default) { setting->LoadString(ReadSetting(name, default_value).value().toStdString()); + } else { + // Empty string resets the Setting to default + setting->LoadString(""); } - } else if (global) { - setting->LoadString(ReadSetting(name, default_value).value().toStdString()); } } diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 410fa80cd..bdb38c8ea 100755 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -495,10 +495,12 @@ void Widget::SetupComponent(const QString& label, std::function& load_fu if (Settings::IsConfiguringGlobal()) { load_func = [this, serializer, checkbox_serializer, require_checkbox, other_setting]() { - if (require_checkbox) { + if (require_checkbox && other_setting->UsingGlobal()) { other_setting->LoadString(checkbox_serializer()); } - setting.LoadString(serializer()); + if (setting.UsingGlobal()) { + setting.LoadString(serializer()); + } }; } else { layout->addWidget(restore_button);