summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
m---------externals/dynarmic0
-rw-r--r--src/common/CMakeLists.txt1
-rw-r--r--src/common/logging/formatter.h23
-rw-r--r--src/common/logging/log.h3
-rw-r--r--src/core/hid/emulated_controller.cpp8
-rw-r--r--src/core/hid/motion_input.cpp1
-rw-r--r--src/input_common/drivers/tas_input.cpp31
-rw-r--r--src/input_common/drivers/udp_client.cpp24
-rw-r--r--src/input_common/input_engine.cpp12
-rw-r--r--src/shader_recompiler/exception.h2
-rw-r--r--src/video_core/memory_manager.cpp96
-rw-r--r--src/video_core/memory_manager.h5
-rw-r--r--src/video_core/texture_cache/texture_cache.h4
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp15
-rw-r--r--src/yuzu/configuration/configure_per_game.cpp24
16 files changed, 146 insertions, 105 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 707d514c3..47bd282fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,7 +169,7 @@ macro(yuzu_find_packages)
set(REQUIRED_LIBS
# Cmake Pkg Prefix Version Conan Pkg
"Catch2 2.13.7 catch2/2.13.7"
- "fmt 8.0.1 fmt/8.0.1"
+ "fmt 8.0.1 fmt/8.1.1"
"lz4 1.8 lz4/1.9.2"
"nlohmann_json 3.8 nlohmann_json/3.8.0"
"ZLIB 1.2 zlib/1.2.11"
diff --git a/externals/dynarmic b/externals/dynarmic
-Subproject 28714ee75aa079cbb706e38bdabc8ee1f6c6951
+Subproject 1635958d0613da376046532e0db5aed6316fbc1
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 790193b00..adf70eb8b 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -85,6 +85,7 @@ add_library(common STATIC
logging/backend.h
logging/filter.cpp
logging/filter.h
+ logging/formatter.h
logging/log.h
logging/log_entry.h
logging/text_formatter.cpp
diff --git a/src/common/logging/formatter.h b/src/common/logging/formatter.h
new file mode 100644
index 000000000..552cde75a
--- /dev/null
+++ b/src/common/logging/formatter.h
@@ -0,0 +1,23 @@
+// Copyright 2022 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <type_traits>
+
+#include <fmt/format.h>
+
+// adapted from https://github.com/fmtlib/fmt/issues/2704
+// a generic formatter for enum classes
+#if FMT_VERSION >= 80100
+template <typename T>
+struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>
+ : formatter<std::underlying_type_t<T>> {
+ template <typename FormatContext>
+ auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) {
+ return fmt::formatter<std::underlying_type_t<T>>::format(
+ static_cast<std::underlying_type_t<T>>(value), ctx);
+ }
+};
+#endif
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index c186d55ef..0c80d01ee 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -7,8 +7,9 @@
#include <algorithm>
#include <string_view>
-#include <fmt/core.h>
+#include <fmt/format.h>
+#include "common/logging/formatter.h"
#include "common/logging/types.h"
namespace Common::Log {
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 6209c707e..13edb7332 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -402,7 +402,8 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
devices.begin(), devices.end(), [param](const Common::ParamPackage param_) {
return param.Get("engine", "") == param_.Get("engine", "") &&
param.Get("guid", "") == param_.Get("guid", "") &&
- param.Get("port", 0) == param_.Get("port", 0);
+ param.Get("port", 0) == param_.Get("port", 0) &&
+ param.Get("pad", 0) == param_.Get("pad", 0);
});
if (devices_it != devices.end()) {
continue;
@@ -411,6 +412,7 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
device.Set("engine", param.Get("engine", ""));
device.Set("guid", param.Get("guid", ""));
device.Set("port", param.Get("port", 0));
+ device.Set("pad", param.Get("pad", 0));
devices.push_back(device);
}
@@ -425,7 +427,8 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
devices.begin(), devices.end(), [param](const Common::ParamPackage param_) {
return param.Get("engine", "") == param_.Get("engine", "") &&
param.Get("guid", "") == param_.Get("guid", "") &&
- param.Get("port", 0) == param_.Get("port", 0);
+ param.Get("port", 0) == param_.Get("port", 0) &&
+ param.Get("pad", 0) == param_.Get("pad", 0);
});
if (devices_it != devices.end()) {
continue;
@@ -434,6 +437,7 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
device.Set("engine", param.Get("engine", ""));
device.Set("guid", param.Get("guid", ""));
device.Set("port", param.Get("port", 0));
+ device.Set("pad", param.Get("pad", 0));
devices.push_back(device);
}
return devices;
diff --git a/src/core/hid/motion_input.cpp b/src/core/hid/motion_input.cpp
index a23f192d7..43152492e 100644
--- a/src/core/hid/motion_input.cpp
+++ b/src/core/hid/motion_input.cpp
@@ -10,6 +10,7 @@ namespace Core::HID {
MotionInput::MotionInput() {
// Initialize PID constants with default values
SetPID(0.3f, 0.005f, 0.0f);
+ SetGyroThreshold(0.001f);
}
void MotionInput::SetPID(f32 new_kp, f32 new_ki, f32 new_kd) {
diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp
index 579fd9473..944e141bf 100644
--- a/src/input_common/drivers/tas_input.cpp
+++ b/src/input_common/drivers/tas_input.cpp
@@ -106,10 +106,16 @@ void Tas::LoadTasFile(size_t player_index, size_t file_index) {
continue;
}
- const auto num_frames = std::stoi(seg_list[0]);
- while (frame_no < num_frames) {
- commands[player_index].emplace_back();
- frame_no++;
+ try {
+ const auto num_frames = std::stoi(seg_list[0]);
+ while (frame_no < num_frames) {
+ commands[player_index].emplace_back();
+ frame_no++;
+ }
+ } catch (const std::invalid_argument&) {
+ LOG_ERROR(Input, "Invalid argument: '{}' at command {}", seg_list[0], frame_no);
+ } catch (const std::out_of_range&) {
+ LOG_ERROR(Input, "Out of range: '{}' at command {}", seg_list[0], frame_no);
}
TASCommand command = {
@@ -234,10 +240,21 @@ TasAnalog Tas::ReadCommandAxis(const std::string& line) const {
}
}
- const float x = std::stof(seg_list.at(0)) / 32767.0f;
- const float y = std::stof(seg_list.at(1)) / 32767.0f;
+ if (seg_list.size() < 2) {
+ LOG_ERROR(Input, "Invalid axis data: '{}'", line);
+ return {};
+ }
- return {x, y};
+ try {
+ const float x = std::stof(seg_list.at(0)) / 32767.0f;
+ const float y = std::stof(seg_list.at(1)) / 32767.0f;
+ return {x, y};
+ } catch (const std::invalid_argument&) {
+ LOG_ERROR(Input, "Invalid argument: '{}'", line);
+ } catch (const std::out_of_range&) {
+ LOG_ERROR(Input, "Out of range: '{}'", line);
+ }
+ return {};
}
u64 Tas::ReadCommandButtons(const std::string& line) const {
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp
index a1ce4525d..c8a12c7d5 100644
--- a/src/input_common/drivers/udp_client.cpp
+++ b/src/input_common/drivers/udp_client.cpp
@@ -442,14 +442,22 @@ MotionMapping UDPClient::GetMotionMappingForDevice(const Common::ParamPackage& p
}
MotionMapping mapping = {};
- Common::ParamPackage motion_params;
- motion_params.Set("engine", GetEngineName());
- motion_params.Set("guid", params.Get("guid", ""));
- motion_params.Set("port", params.Get("port", 0));
- motion_params.Set("pad", params.Get("pad", 0));
- motion_params.Set("motion", 0);
- mapping.insert_or_assign(Settings::NativeMotion::MotionLeft, std::move(motion_params));
- mapping.insert_or_assign(Settings::NativeMotion::MotionRight, std::move(motion_params));
+ Common::ParamPackage left_motion_params;
+ left_motion_params.Set("engine", GetEngineName());
+ left_motion_params.Set("guid", params.Get("guid", ""));
+ left_motion_params.Set("port", params.Get("port", 0));
+ left_motion_params.Set("pad", params.Get("pad", 0));
+ left_motion_params.Set("motion", 0);
+
+ Common::ParamPackage right_motion_params;
+ right_motion_params.Set("engine", GetEngineName());
+ right_motion_params.Set("guid", params.Get("guid", ""));
+ right_motion_params.Set("port", params.Get("port", 0));
+ right_motion_params.Set("pad", params.Get("pad", 0));
+ right_motion_params.Set("motion", 0);
+
+ mapping.insert_or_assign(Settings::NativeMotion::MotionLeft, std::move(left_motion_params));
+ mapping.insert_or_assign(Settings::NativeMotion::MotionRight, std::move(right_motion_params));
return mapping;
}
diff --git a/src/input_common/input_engine.cpp b/src/input_common/input_engine.cpp
index 9c17ca4f7..b57330e51 100644
--- a/src/input_common/input_engine.cpp
+++ b/src/input_common/input_engine.cpp
@@ -298,8 +298,16 @@ void InputEngine::TriggerOnMotionChange(const PadIdentifier& identifier, int mot
if (!configuring || !mapping_callback.on_data) {
return;
}
- if (std::abs(value.gyro_x) < 0.6f && std::abs(value.gyro_y) < 0.6f &&
- std::abs(value.gyro_z) < 0.6f) {
+ bool is_active = false;
+ if (std::abs(value.accel_x) > 1.5f || std::abs(value.accel_y) > 1.5f ||
+ std::abs(value.accel_z) > 1.5f) {
+ is_active = true;
+ }
+ if (std::abs(value.gyro_x) > 0.6f || std::abs(value.gyro_y) > 0.6f ||
+ std::abs(value.gyro_z) > 0.6f) {
+ is_active = true;
+ }
+ if (!is_active) {
return;
}
mapping_callback.on_data(MappingData{
diff --git a/src/shader_recompiler/exception.h b/src/shader_recompiler/exception.h
index 277be8541..d98b6029b 100644
--- a/src/shader_recompiler/exception.h
+++ b/src/shader_recompiler/exception.h
@@ -9,7 +9,7 @@
#include <string_view>
#include <utility>
-#include <fmt/format.h>
+#include "common/logging/formatter.h"
namespace Shader {
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp
index dce00e829..4ff3fa268 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -73,12 +73,12 @@ void MemoryManager::Unmap(GPUVAddr gpu_addr, std::size_t size) {
}
const auto submapped_ranges = GetSubmappedRange(gpu_addr, size);
- for (const auto& map : submapped_ranges) {
+ for (const auto& [map_addr, map_size] : submapped_ranges) {
// Flush and invalidate through the GPU interface, to be asynchronous if possible.
- const std::optional<VAddr> cpu_addr = GpuToCpuAddress(map.first);
+ const std::optional<VAddr> cpu_addr = GpuToCpuAddress(map_addr);
ASSERT(cpu_addr);
- rasterizer->UnmapMemory(*cpu_addr, map.second);
+ rasterizer->UnmapMemory(*cpu_addr, map_size);
}
UpdateRange(gpu_addr, PageEntry::State::Unmapped, size);
@@ -265,7 +265,8 @@ size_t MemoryManager::BytesToMapEnd(GPUVAddr gpu_addr) const noexcept {
return it->second - (gpu_addr - it->first);
}
-void MemoryManager::ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size) const {
+void MemoryManager::ReadBlockImpl(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size,
+ bool is_safe) const {
std::size_t remaining_size{size};
std::size_t page_index{gpu_src_addr >> page_bits};
std::size_t page_offset{gpu_src_addr & page_mask};
@@ -273,14 +274,18 @@ void MemoryManager::ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, std::siz
while (remaining_size > 0) {
const std::size_t copy_amount{
std::min(static_cast<std::size_t>(page_size) - page_offset, remaining_size)};
-
- if (const auto page_addr{GpuToCpuAddress(page_index << page_bits)}; page_addr) {
+ const auto page_addr{GpuToCpuAddress(page_index << page_bits)};
+ if (page_addr && *page_addr != 0) {
const auto src_addr{*page_addr + page_offset};
-
- // Flush must happen on the rasterizer interface, such that memory is always synchronous
- // when it is read (even when in asynchronous GPU mode). Fixes Dead Cells title menu.
- rasterizer->FlushRegion(src_addr, copy_amount);
+ if (is_safe) {
+ // Flush must happen on the rasterizer interface, such that memory is always
+ // synchronous when it is read (even when in asynchronous GPU mode).
+ // Fixes Dead Cells title menu.
+ rasterizer->FlushRegion(src_addr, copy_amount);
+ }
system.Memory().ReadBlockUnsafe(src_addr, dest_buffer, copy_amount);
+ } else {
+ std::memset(dest_buffer, 0, copy_amount);
}
page_index++;
@@ -290,31 +295,17 @@ void MemoryManager::ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, std::siz
}
}
+void MemoryManager::ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size) const {
+ ReadBlockImpl(gpu_src_addr, dest_buffer, size, true);
+}
+
void MemoryManager::ReadBlockUnsafe(GPUVAddr gpu_src_addr, void* dest_buffer,
const std::size_t size) const {
- std::size_t remaining_size{size};
- std::size_t page_index{gpu_src_addr >> page_bits};
- std::size_t page_offset{gpu_src_addr & page_mask};
-
- while (remaining_size > 0) {
- const std::size_t copy_amount{
- std::min(static_cast<std::size_t>(page_size) - page_offset, remaining_size)};
-
- if (const auto page_addr{GpuToCpuAddress(page_index << page_bits)}; page_addr) {
- const auto src_addr{*page_addr + page_offset};
- system.Memory().ReadBlockUnsafe(src_addr, dest_buffer, copy_amount);
- } else {
- std::memset(dest_buffer, 0, copy_amount);
- }
-
- page_index++;
- page_offset = 0;
- dest_buffer = static_cast<u8*>(dest_buffer) + copy_amount;
- remaining_size -= copy_amount;
- }
+ ReadBlockImpl(gpu_src_addr, dest_buffer, size, false);
}
-void MemoryManager::WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size) {
+void MemoryManager::WriteBlockImpl(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size,
+ bool is_safe) {
std::size_t remaining_size{size};
std::size_t page_index{gpu_dest_addr >> page_bits};
std::size_t page_offset{gpu_dest_addr & page_mask};
@@ -322,13 +313,15 @@ void MemoryManager::WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, s
while (remaining_size > 0) {
const std::size_t copy_amount{
std::min(static_cast<std::size_t>(page_size) - page_offset, remaining_size)};
-
- if (const auto page_addr{GpuToCpuAddress(page_index << page_bits)}; page_addr) {
+ const auto page_addr{GpuToCpuAddress(page_index << page_bits)};
+ if (page_addr && *page_addr != 0) {
const auto dest_addr{*page_addr + page_offset};
- // Invalidate must happen on the rasterizer interface, such that memory is always
- // synchronous when it is written (even when in asynchronous GPU mode).
- rasterizer->InvalidateRegion(dest_addr, copy_amount);
+ if (is_safe) {
+ // Invalidate must happen on the rasterizer interface, such that memory is always
+ // synchronous when it is written (even when in asynchronous GPU mode).
+ rasterizer->InvalidateRegion(dest_addr, copy_amount);
+ }
system.Memory().WriteBlockUnsafe(dest_addr, src_buffer, copy_amount);
}
@@ -339,26 +332,13 @@ void MemoryManager::WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, s
}
}
+void MemoryManager::WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size) {
+ WriteBlockImpl(gpu_dest_addr, src_buffer, size, true);
+}
+
void MemoryManager::WriteBlockUnsafe(GPUVAddr gpu_dest_addr, const void* src_buffer,
std::size_t size) {
- std::size_t remaining_size{size};
- std::size_t page_index{gpu_dest_addr >> page_bits};
- std::size_t page_offset{gpu_dest_addr & page_mask};
-
- while (remaining_size > 0) {
- const std::size_t copy_amount{
- std::min(static_cast<std::size_t>(page_size) - page_offset, remaining_size)};
-
- if (const auto page_addr{GpuToCpuAddress(page_index << page_bits)}; page_addr) {
- const auto dest_addr{*page_addr + page_offset};
- system.Memory().WriteBlockUnsafe(dest_addr, src_buffer, copy_amount);
- }
-
- page_index++;
- page_offset = 0;
- src_buffer = static_cast<const u8*>(src_buffer) + copy_amount;
- remaining_size -= copy_amount;
- }
+ WriteBlockImpl(gpu_dest_addr, src_buffer, size, false);
}
void MemoryManager::FlushRegion(GPUVAddr gpu_addr, size_t size) const {
@@ -435,15 +415,15 @@ std::vector<std::pair<GPUVAddr, std::size_t>> MemoryManager::GetSubmappedRange(
size_t page_offset{gpu_addr & page_mask};
std::optional<std::pair<GPUVAddr, std::size_t>> last_segment{};
std::optional<VAddr> old_page_addr{};
- const auto extend_size = [this, &last_segment, &page_index](std::size_t bytes) {
+ const auto extend_size = [&last_segment, &page_index, &page_offset](std::size_t bytes) {
if (!last_segment) {
- GPUVAddr new_base_addr = page_index << page_bits;
+ const GPUVAddr new_base_addr = (page_index << page_bits) + page_offset;
last_segment = {new_base_addr, bytes};
} else {
last_segment->second += bytes;
}
};
- const auto split = [this, &last_segment, &result] {
+ const auto split = [&last_segment, &result] {
if (last_segment) {
result.push_back(*last_segment);
last_segment = std::nullopt;
@@ -452,7 +432,7 @@ std::vector<std::pair<GPUVAddr, std::size_t>> MemoryManager::GetSubmappedRange(
while (remaining_size > 0) {
const size_t num_bytes{std::min(page_size - page_offset, remaining_size)};
const auto page_addr{GpuToCpuAddress(page_index << page_bits)};
- if (!page_addr) {
+ if (!page_addr || *page_addr == 0) {
split();
} else if (old_page_addr) {
if (*old_page_addr + page_size != *page_addr) {
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h
index 99d13e7f6..38d8d9d74 100644
--- a/src/video_core/memory_manager.h
+++ b/src/video_core/memory_manager.h
@@ -155,6 +155,11 @@ private:
void FlushRegion(GPUVAddr gpu_addr, size_t size) const;
+ void ReadBlockImpl(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size,
+ bool is_safe) const;
+ void WriteBlockImpl(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size,
+ bool is_safe);
+
[[nodiscard]] static constexpr std::size_t PageEntryIndex(GPUVAddr gpu_addr) {
return (gpu_addr >> page_bits) & page_table_mask;
}
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index b494152b8..198bb0cfb 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -1376,9 +1376,7 @@ void TextureCache<P>::ForEachSparseSegment(ImageBase& image, Func&& func) {
using FuncReturn = typename std::invoke_result<Func, GPUVAddr, VAddr, size_t>::type;
static constexpr bool RETURNS_BOOL = std::is_same_v<FuncReturn, bool>;
const auto segments = gpu_memory.GetSubmappedRange(image.gpu_addr, image.guest_size_bytes);
- for (auto& segment : segments) {
- const auto gpu_addr = segment.first;
- const auto size = segment.second;
+ for (const auto& [gpu_addr, size] : segments) {
std::optional<VAddr> cpu_addr = gpu_memory.GpuToCpuAddress(gpu_addr);
ASSERT(cpu_addr);
if constexpr (RETURNS_BOOL) {
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 8c6249fc2..b9342466e 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -747,15 +747,16 @@ void ConfigureInputPlayer::UpdateInputDeviceCombobox() {
const auto first_engine = devices[0].Get("engine", "");
const auto first_guid = devices[0].Get("guid", "");
const auto first_port = devices[0].Get("port", 0);
+ const auto first_pad = devices[0].Get("pad", 0);
if (devices.size() == 1) {
- const auto devices_it =
- std::find_if(input_devices.begin(), input_devices.end(),
- [first_engine, first_guid, first_port](const Common::ParamPackage param) {
- return param.Get("engine", "") == first_engine &&
- param.Get("guid", "") == first_guid &&
- param.Get("port", 0) == first_port;
- });
+ const auto devices_it = std::find_if(
+ input_devices.begin(), input_devices.end(),
+ [first_engine, first_guid, first_port, first_pad](const Common::ParamPackage param) {
+ return param.Get("engine", "") == first_engine &&
+ param.Get("guid", "") == first_guid && param.Get("port", 0) == first_port &&
+ param.Get("pad", 0) == first_pad;
+ });
const int device_index =
devices_it != input_devices.end()
? static_cast<int>(std::distance(input_devices.begin(), devices_it))
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp
index 12699c126..f4cf25f05 100644
--- a/src/yuzu/configuration/configure_per_game.cpp
+++ b/src/yuzu/configuration/configure_per_game.cpp
@@ -45,20 +45,21 @@
ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id, const std::string& file_name,
Core::System& system_)
: QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()),
- title_id(title_id), system{system_}, addons_tab{std::make_unique<ConfigurePerGameAddons>(
- system_, this)},
- audio_tab{std::make_unique<ConfigureAudio>(system_, this)},
- cpu_tab{std::make_unique<ConfigureCpu>(system_, this)},
- general_tab{std::make_unique<ConfigureGeneral>(system_, this)},
- graphics_tab{std::make_unique<ConfigureGraphics>(system_, this)},
- graphics_advanced_tab{std::make_unique<ConfigureGraphicsAdvanced>(system_, this)},
- system_tab{std::make_unique<ConfigureSystem>(system_, this)} {
+ title_id(title_id), system{system_} {
const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name));
const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename())
: fmt::format("{:016X}", title_id);
game_config =
std::make_unique<Config>(system, config_file_name, Config::ConfigType::PerGameConfig);
+ addons_tab = std::make_unique<ConfigurePerGameAddons>(system_, this);
+ audio_tab = std::make_unique<ConfigureAudio>(system_, this);
+ cpu_tab = std::make_unique<ConfigureCpu>(system_, this);
+ general_tab = std::make_unique<ConfigureGeneral>(system_, this);
+ graphics_tab = std::make_unique<ConfigureGraphics>(system_, this);
+ graphics_advanced_tab = std::make_unique<ConfigureGraphicsAdvanced>(system_, this);
+ system_tab = std::make_unique<ConfigureSystem>(system_, this);
+
ui->setupUi(this);
ui->tabWidget->addTab(addons_tab.get(), tr("Add-Ons"));
@@ -187,11 +188,4 @@ void ConfigurePerGame::LoadConfiguration() {
const auto valueText = ReadableByteSize(file->GetSize());
ui->display_size->setText(valueText);
-
- general_tab->SetConfiguration();
- cpu_tab->SetConfiguration();
- system_tab->SetConfiguration();
- graphics_tab->SetConfiguration();
- graphics_advanced_tab->SetConfiguration();
- audio_tab->SetConfiguration();
}