early-access version 3777

This commit is contained in:
pineappleEA 2023-07-24 21:15:41 +02:00
parent 9fcee8aba9
commit 9853fdbaf4
4 changed files with 37 additions and 29 deletions

View file

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

View file

@ -46,17 +46,18 @@ constexpr u8 SpecializationTypeMask = 0xf;
constexpr u8 SpecializationAttributeMask = 0xf0; constexpr u8 SpecializationAttributeMask = 0xf0;
constexpr u8 SpecializationAttributeOffset = 4; constexpr u8 SpecializationAttributeOffset = 4;
// Scalar and countable could have better names
enum Specialization : u8 { enum Specialization : u8 {
Default = 0, Default = 0,
Time = 1, Time = 1, // Duration or specific moment in time
Hex = 2, Hex = 2, // Hexadecimal number
List = 3, List = 3, // Setting has specific members
RuntimeList = 4, RuntimeList = 4, // Members of the list are determined during runtime
Scalar = 5, Scalar = 5, // Values are continuous
Countable = 6, Countable = 6, // Can be stepped through
Paired = 7, Paired = 7, // Another setting is associated with this setting
Percentage = (1 << SpecializationAttributeOffset), Percentage = (1 << SpecializationAttributeOffset), // Should be represented as a percentage
}; };
class BasicSetting; class BasicSetting;

View file

@ -390,25 +390,6 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
QWidget* data_component{nullptr}; QWidget* data_component{nullptr};
if (!Settings::IsConfiguringGlobal() && managed) {
restore_button = CreateRestoreGlobalButton(setting.UsingGlobal(), this);
touch = [this]() {
LOG_DEBUG(Frontend, "Enabling custom setting for \"{}\"", setting.GetLabel());
restore_button->setEnabled(true);
restore_button->setVisible(true);
};
}
if (require_checkbox) {
QWidget* lhs =
CreateCheckBox(other_setting, label, checkbox_serializer, checkbox_restore_func, touch);
layout->addWidget(lhs);
} else if (setting.TypeId() != typeid(bool)) {
QLabel* qt_label = CreateLabel(label);
layout->addWidget(qt_label);
}
request = [&]() { request = [&]() {
if (request != RequestType::Default) { if (request != RequestType::Default) {
return request; return request;
@ -435,6 +416,25 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
return request; return request;
}(); }();
if (!Settings::IsConfiguringGlobal() && managed) {
restore_button = CreateRestoreGlobalButton(setting.UsingGlobal(), this);
touch = [this]() {
LOG_DEBUG(Frontend, "Enabling custom setting for \"{}\"", setting.GetLabel());
restore_button->setEnabled(true);
restore_button->setVisible(true);
};
}
if (require_checkbox) {
QWidget* lhs =
CreateCheckBox(other_setting, label, checkbox_serializer, checkbox_restore_func, touch);
layout->addWidget(lhs);
} else if (setting.TypeId() != typeid(bool)) {
QLabel* qt_label = CreateLabel(label);
layout->addWidget(qt_label);
}
if (setting.TypeId() == typeid(bool)) { if (setting.TypeId() == typeid(bool)) {
data_component = CreateCheckBox(&setting, label, serializer, restore_func, touch); data_component = CreateCheckBox(&setting, label, serializer, restore_func, touch);
} else if (setting.IsEnum()) { } else if (setting.IsEnum()) {
@ -505,6 +505,9 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
QObject::connect(restore_button, &QAbstractButton::clicked, QObject::connect(restore_button, &QAbstractButton::clicked,
[this, restore_func, checkbox_restore_func](bool) { [this, restore_func, checkbox_restore_func](bool) {
LOG_DEBUG(Frontend, "Restore global state for \"{}\"",
setting.GetLabel());
restore_button->setEnabled(false); restore_button->setEnabled(false);
restore_button->setVisible(false); restore_button->setVisible(false);

View file

@ -265,7 +265,11 @@ void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) {
std::vector<u8> icon; std::vector<u8> icon;
std::string name; std::string name;
u64 program_id = 0; u64 program_id = 0;
loader->ReadProgramId(program_id); const auto result = loader->ReadProgramId(program_id);
if (result != Loader::ResultStatus::Success) {
continue;
}
const PatchManager patch{program_id, system.GetFileSystemController(), const PatchManager patch{program_id, system.GetFileSystemController(),
system.GetContentProvider()}; system.GetContentProvider()};