early-access version 3783

This commit is contained in:
pineappleEA 2023-07-31 17:00:31 +02:00
parent b1fc1da318
commit 6b3fa29835
6 changed files with 36 additions and 18 deletions

View file

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3782. This is the source code for early-access 3783.
## Legal Notice ## Legal Notice

View file

@ -3,6 +3,7 @@
#include <chrono> #include <chrono>
#include <sstream> #include <sstream>
#include <utility>
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/settings.h" #include "common/settings.h"
@ -46,14 +47,14 @@ static FileSys::VirtualDir GetTimeZoneBinary(Core::System& system) {
return FileSys::ExtractRomFS(romfs); return FileSys::ExtractRomFS(romfs);
} }
static std::vector<std::string> BuildLocationNameCache(Core::System& system) { static std::vector<std::string> BuildLocationNameCache(
const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)}; const FileSys::VirtualDir& time_zone_binary) {
if (!extracted_romfs) { if (!time_zone_binary) {
LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid);
return {}; 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) { if (!binary_list) {
LOG_ERROR(Service_Time, "{:016X} has no file binaryList.txt!", time_zone_binary_titleid); LOG_ERROR(Service_Time, "{:016X} has no file binaryList.txt!", time_zone_binary_titleid);
return {}; return {};
@ -73,7 +74,8 @@ static std::vector<std::string> BuildLocationNameCache(Core::System& system) {
} }
TimeZoneContentManager::TimeZoneContentManager(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) { void TimeZoneContentManager::Initialize(TimeManager& time_manager) {
const auto timezone_setting = const auto timezone_setting =
@ -112,13 +114,12 @@ Result TimeZoneContentManager::GetTimeZoneInfoFile(const std::string& location_n
return ERROR_TIME_NOT_FOUND; return ERROR_TIME_NOT_FOUND;
} }
const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)}; if (!time_zone_binary) {
if (!extracted_romfs) {
LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid);
return ERROR_TIME_NOT_FOUND; 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) { if (!zoneinfo_dir) {
LOG_ERROR(Service_Time, "{:016X} has no directory zoneinfo!", time_zone_binary_titleid); LOG_ERROR(Service_Time, "{:016X} has no directory zoneinfo!", time_zone_binary_titleid);
return ERROR_TIME_NOT_FOUND; return ERROR_TIME_NOT_FOUND;

View file

@ -6,6 +6,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "core/file_sys/vfs_types.h"
#include "core/hle/service/time/time_zone_manager.h" #include "core/hle/service/time/time_zone_manager.h"
namespace Core { namespace Core {
@ -41,6 +42,7 @@ private:
Core::System& system; Core::System& system;
TimeZoneManager time_zone_manager; TimeZoneManager time_zone_manager;
const FileSys::VirtualDir time_zone_binary;
const std::vector<std::string> location_name_cache; const std::vector<std::string> location_name_cache;
}; };

View file

@ -554,6 +554,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
} }
sets_per_pool = 64; 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) { if (is_amd_driver) {
// AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2. // AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2.
sets_per_pool = 96; sets_per_pool = 96;

View file

@ -1090,6 +1090,7 @@ void Config::SaveUIValues() {
qt_config->beginGroup(QStringLiteral("UI")); qt_config->beginGroup(QStringLiteral("UI"));
WriteCategory(Settings::Category::Ui); WriteCategory(Settings::Category::Ui);
WriteCategory(Settings::Category::UiGeneral);
WriteSetting(QStringLiteral("theme"), UISettings::values.theme, WriteSetting(QStringLiteral("theme"), UISettings::values.theme,
QString::fromUtf8(UISettings::themes[static_cast<size_t>(default_theme)].second)); QString::fromUtf8(UISettings::themes[static_cast<size_t>(default_theme)].second));
@ -1256,23 +1257,27 @@ void Config::WriteCategory(Settings::Category category) {
} }
void Config::ReadSettingGeneric(Settings::BasicSetting* const setting) { void Config::ReadSettingGeneric(Settings::BasicSetting* const setting) {
if (!setting->Save()) { if (!setting->Save() || (!setting->Switchable() && !global)) {
return; return;
} }
const QString name = QString::fromStdString(setting->GetLabel()); const QString name = QString::fromStdString(setting->GetLabel());
const auto default_value = const auto default_value =
QVariant::fromValue<QString>(QString::fromStdString(setting->DefaultToString())); QVariant::fromValue<QString>(QString::fromStdString(setting->DefaultToString()));
if (setting->Switchable()) { bool use_global = true;
const bool use_global = if (setting->Switchable() && !global) {
qt_config->value(name + QStringLiteral("/use_global"), true).value<bool>(); use_global = qt_config->value(name + QStringLiteral("/use_global"), true).value<bool>();
setting->SetGlobal(use_global); setting->SetGlobal(use_global);
}
if (global || !use_global) { if (global || !use_global) {
const bool is_default = ReadSetting(name + QStringLiteral("/default"), true).value<bool>();
if (!is_default) {
setting->LoadString(ReadSetting(name, default_value).value<QString>().toStdString()); setting->LoadString(ReadSetting(name, default_value).value<QString>().toStdString());
} else {
// Empty string resets the Setting to default
setting->LoadString("");
} }
} else if (global) {
setting->LoadString(ReadSetting(name, default_value).value<QString>().toStdString());
} }
} }

View file

@ -495,10 +495,12 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
if (Settings::IsConfiguringGlobal()) { if (Settings::IsConfiguringGlobal()) {
load_func = [this, serializer, checkbox_serializer, require_checkbox, other_setting]() { load_func = [this, serializer, checkbox_serializer, require_checkbox, other_setting]() {
if (require_checkbox) { if (require_checkbox && other_setting->UsingGlobal()) {
other_setting->LoadString(checkbox_serializer()); other_setting->LoadString(checkbox_serializer());
} }
setting.LoadString(serializer()); if (setting.UsingGlobal()) {
setting.LoadString(serializer());
}
}; };
} else { } else {
layout->addWidget(restore_button); layout->addWidget(restore_button);