summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/bit_util.h6
-rw-r--r--src/core/hid/input_converter.cpp2
-rw-r--r--src/core/hle/service/acc/acc_su.cpp4
-rw-r--r--src/core/hle/service/acc/acc_u1.cpp4
-rw-r--r--src/core/hle/service/am/omm.cpp1
-rw-r--r--src/core/hle/service/audio/audctl.cpp16
-rw-r--r--src/core/hle/service/btm/btm.cpp30
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp3
-rw-r--r--src/core/hle/service/friend/friend.cpp12
-rw-r--r--src/core/hle/service/nim/nim.cpp6
-rw-r--r--src/core/hle/service/ns/ns.cpp6
-rw-r--r--src/core/hle/service/set/set_sys.cpp2
-rw-r--r--src/core/hle/service/usb/usb.cpp42
-rw-r--r--src/core/hle/service/wlan/wlan.cpp2
-rw-r--r--src/shader_recompiler/backend/glsl/glsl_emit_context.cpp7
-rw-r--r--src/shader_recompiler/backend/spirv/spirv_emit_context.cpp7
-rw-r--r--src/video_core/command_classes/codecs/codec.h2
-rw-r--r--src/yuzu/configuration/config.cpp9
-rw-r--r--src/yuzu/configuration/config.h8
19 files changed, 109 insertions, 60 deletions
diff --git a/src/common/bit_util.h b/src/common/bit_util.h
index eef8c1c5a..f50d3308a 100644
--- a/src/common/bit_util.h
+++ b/src/common/bit_util.h
@@ -46,6 +46,12 @@ template <typename T>
}
template <typename T>
+requires std::is_unsigned_v<T>
+[[nodiscard]] constexpr bool IsPow2(T value) {
+ return std::has_single_bit(value);
+}
+
+template <typename T>
requires std::is_integral_v<T>
[[nodiscard]] T NextPow2(T value) {
return static_cast<T>(1ULL << ((8U * sizeof(T)) - std::countl_zero(value - 1U)));
diff --git a/src/core/hid/input_converter.cpp b/src/core/hid/input_converter.cpp
index f5acff6e0..860aab400 100644
--- a/src/core/hid/input_converter.cpp
+++ b/src/core/hid/input_converter.cpp
@@ -114,7 +114,7 @@ Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatu
if (TransformToButton(callback).value) {
std::random_device device;
std::mt19937 gen(device());
- std::uniform_int_distribution<s16> distribution(-1000, 1000);
+ std::uniform_int_distribution<s16> distribution(-5000, 5000);
status.accel.x.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
status.accel.y.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
status.accel.z.raw_value = static_cast<f32>(distribution(gen)) * 0.001f;
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp
index 94a1b8814..f4034d591 100644
--- a/src/core/hle/service/acc/acc_su.cpp
+++ b/src/core/hle/service/acc/acc_su.cpp
@@ -37,8 +37,8 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager>
{130, nullptr, "ActivateOpenContextRetention"},
{140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"},
{150, nullptr, "AuthenticateApplicationAsync"},
- {151, nullptr, "Unknown151"},
- {152, nullptr, "Unknown152"},
+ {151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
+ {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
{190, nullptr, "GetUserLastOpenedApplication"},
{191, nullptr, "ActivateOpenContextHolder"},
{200, nullptr, "BeginUserRegistration"},
diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp
index 6ce7fe8e6..991921984 100644
--- a/src/core/hle/service/acc/acc_u1.cpp
+++ b/src/core/hle/service/acc/acc_u1.cpp
@@ -37,8 +37,8 @@ ACC_U1::ACC_U1(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager>
{130, nullptr, "ActivateOpenContextRetention"},
{140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"},
{150, nullptr, "AuthenticateApplicationAsync"},
- {151, nullptr, "Unknown151"},
- {152, nullptr, "Unknown152"},
+ {151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
+ {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
{190, nullptr, "GetUserLastOpenedApplication"},
{191, nullptr, "ActivateOpenContextHolder"},
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
diff --git a/src/core/hle/service/am/omm.cpp b/src/core/hle/service/am/omm.cpp
index 55de67e1d..6da9b9f58 100644
--- a/src/core/hle/service/am/omm.cpp
+++ b/src/core/hle/service/am/omm.cpp
@@ -37,6 +37,7 @@ OMM::OMM(Core::System& system_) : ServiceFramework{system_, "omm"} {
{25, nullptr, "SetApplicationCecSettingsAndNotifyChanged"},
{26, nullptr, "GetOperationModeSystemInfo"},
{27, nullptr, "GetAppletFullAwakingSystemEvent"},
+ {28, nullptr, "CreateCradleFirmwareUpdater"},
};
// clang-format on
diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp
index 2e46e7161..260fd0e0e 100644
--- a/src/core/hle/service/audio/audctl.cpp
+++ b/src/core/hle/service/audio/audctl.cpp
@@ -41,14 +41,14 @@ AudCtl::AudCtl(Core::System& system_) : ServiceFramework{system_, "audctl"} {
{27, nullptr, "SetVolumeMappingTableForDev"},
{28, nullptr, "GetAudioOutputChannelCountForPlayReport"},
{29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"},
- {30, nullptr, "Unknown30"},
- {31, nullptr, "Unknown31"},
- {32, nullptr, "Unknown32"},
- {33, nullptr, "Unknown33"},
- {34, nullptr, "Unknown34"},
- {10000, nullptr, "Unknown10000"},
- {10001, nullptr, "Unknown10001"},
- {10002, nullptr, "Unknown10002"},
+ {30, nullptr, "SetSpeakerAutoMuteEnabled"},
+ {31, nullptr, "IsSpeakerAutoMuteEnabled"},
+ {32, nullptr, "GetActiveOutputTarget"},
+ {33, nullptr, "GetTargetDeviceInfo"},
+ {34, nullptr, "AcquireTargetNotification"},
+ {10000, nullptr, "NotifyAudioOutputTargetForPlayReport"},
+ {10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"},
+ {10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"},
};
// clang-format on
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp
index d337fd317..cc268d877 100644
--- a/src/core/hle/service/btm/btm.cpp
+++ b/src/core/hle/service/btm/btm.cpp
@@ -201,6 +201,22 @@ public:
{62, nullptr, "Unknown62"},
{63, nullptr, "Unknown63"},
{64, nullptr, "Unknown64"},
+ {65, nullptr, "Unknown65"},
+ {66, nullptr, "Unknown66"},
+ {67, nullptr, "Unknown67"},
+ {68, nullptr, "Unknown68"},
+ {69, nullptr, "Unknown69"},
+ {70, nullptr, "Unknown70"},
+ {71, nullptr, "Unknown71"},
+ {72, nullptr, "Unknown72"},
+ {73, nullptr, "Unknown73"},
+ {74, nullptr, "Unknown74"},
+ {75, nullptr, "Unknown75"},
+ {76, nullptr, "Unknown76"},
+ {100, nullptr, "Unknown100"},
+ {101, nullptr, "Unknown101"},
+ {110, nullptr, "Unknown102"},
+ {111, nullptr, "Unknown103"},
};
// clang-format on
@@ -249,6 +265,20 @@ public:
{7, nullptr, "AcquireRadioEvent"},
{8, nullptr, "AcquireGamepadPairingEvent"},
{9, nullptr, "IsGamepadPairingStarted"},
+ {10, nullptr, "StartAudioDeviceDiscovery"},
+ {11, nullptr, "StopAudioDeviceDiscovery"},
+ {12, nullptr, "IsDiscoveryingAudioDevice"},
+ {13, nullptr, "GetDiscoveredAudioDevice"},
+ {14, nullptr, "AcquireAudioDeviceConnectionEvent"},
+ {15, nullptr, "ConnectAudioDevice"},
+ {16, nullptr, "IsConnectingAudioDevice"},
+ {17, nullptr, "GetConnectedAudioDevices"},
+ {18, nullptr, "DisconnectAudioDevice"},
+ {19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"},
+ {20, nullptr, "GetPairedAudioDevices"},
+ {21, nullptr, "RemoveAudioDevicePairing"},
+ {22, nullptr, "RequestAudioDeviceConnectionRejection"},
+ {23, nullptr, "CancelAudioDeviceConnectionRejection"}
};
// clang-format on
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 3501bc1a4..b087e7bba 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -744,6 +744,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{203, &FSP_SRV::OpenPatchDataStorageByCurrentProcess, "OpenPatchDataStorageByCurrentProcess"},
{204, nullptr, "OpenDataFileSystemByProgramIndex"},
{205, &FSP_SRV::OpenDataStorageWithProgramIndex, "OpenDataStorageWithProgramIndex"},
+ {206, nullptr, "OpenDataStorageByPath"},
{400, nullptr, "OpenDeviceOperator"},
{500, nullptr, "OpenSdCardDetectionEventNotifier"},
{501, nullptr, "OpenGameCardDetectionEventNotifier"},
@@ -796,6 +797,8 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{1014, nullptr, "OutputMultiProgramTagAccessLog"},
{1016, nullptr, "FlushAccessLogOnSdCard"},
{1017, nullptr, "OutputApplicationInfoAccessLog"},
+ {1018, nullptr, "SetDebugOption"},
+ {1019, nullptr, "UnsetDebugOption"},
{1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
{1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
{1200, &FSP_SRV::OpenMultiCommitManager, "OpenMultiCommitManager"},
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
index 3c36f4085..9f9cea1e0 100644
--- a/src/core/hle/service/friend/friend.cpp
+++ b/src/core/hle/service/friend/friend.cpp
@@ -27,13 +27,13 @@ public:
{10101, &IFriendService::GetFriendList, "GetFriendList"},
{10102, nullptr, "UpdateFriendInfo"},
{10110, nullptr, "GetFriendProfileImage"},
- {10120, nullptr, "Unknown10120"},
- {10121, nullptr, "Unknown10121"},
+ {10120, nullptr, "IsFriendListCacheAvailable"},
+ {10121, nullptr, "EnsureFriendListAvailable"},
{10200, nullptr, "SendFriendRequestForApplication"},
{10211, nullptr, "AddFacedFriendRequestForApplication"},
{10400, &IFriendService::GetBlockedUserListIds, "GetBlockedUserListIds"},
- {10420, nullptr, "Unknown10420"},
- {10421, nullptr, "Unknown10421"},
+ {10420, nullptr, "IsBlockedUserListCacheAvailable"},
+ {10421, nullptr, "EnsureBlockedUserListAvailable"},
{10500, nullptr, "GetProfileList"},
{10600, nullptr, "DeclareOpenOnlinePlaySession"},
{10601, &IFriendService::DeclareCloseOnlinePlaySession, "DeclareCloseOnlinePlaySession"},
@@ -103,8 +103,8 @@ public:
{30900, nullptr, "SendFriendInvitation"},
{30910, nullptr, "ReadFriendInvitation"},
{30911, nullptr, "ReadAllFriendInvitations"},
- {40100, nullptr, "Unknown40100"},
- {40400, nullptr, "Unknown40400"},
+ {40100, nullptr, "DeleteFriendListCache"},
+ {40400, nullptr, "DeleteBlockedUserListCache"},
{49900, nullptr, "DeleteNetworkServiceAccountCache"},
};
// clang-format on
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp
index 196f274e1..4fc23a958 100644
--- a/src/core/hle/service/nim/nim.cpp
+++ b/src/core/hle/service/nim/nim.cpp
@@ -211,6 +211,11 @@ public:
{127, nullptr, "Unknown127"},
{128, nullptr, "Unknown128"},
{129, nullptr, "Unknown129"},
+ {130, nullptr, "Unknown130"},
+ {131, nullptr, "Unknown131"},
+ {132, nullptr, "Unknown132"},
+ {133, nullptr, "Unknown133"},
+ {134, nullptr, "Unknown134"},
};
// clang-format on
@@ -287,6 +292,7 @@ public:
{502, nullptr, "RequestDownloadTicketForPrepurchasedContents"},
{503, nullptr, "RequestSyncTicket"},
{504, nullptr, "RequestDownloadTicketForPrepurchasedContents2"},
+ {505, nullptr, "RequestDownloadTicketForPrepurchasedContentsForAccount"},
};
// clang-format on
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp
index 382ddcae5..5eaad0474 100644
--- a/src/core/hle/service/ns/ns.cpp
+++ b/src/core/hle/service/ns/ns.cpp
@@ -158,6 +158,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"},
{606, nullptr, "GetContentMetaStorage"},
{607, nullptr, "ListAvailableAddOnContent"},
+ {609, nullptr, "ListAvailabilityAssuredAddOnContent"},
{700, nullptr, "PushDownloadTaskList"},
{701, nullptr, "ClearTaskStatusList"},
{702, nullptr, "RequestDownloadTaskList"},
@@ -289,6 +290,11 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{2514, nullptr, "ClearTaskOfAsyncTaskManager"},
{2515, nullptr, "CleanupAllPlaceHolderAndFragmentsIfNoTask"},
{2516, nullptr, "EnsureApplicationCertificate"},
+ {2517, nullptr, "CreateApplicationInstance"},
+ {2518, nullptr, "UpdateQualificationForDebug"},
+ {2519, nullptr, "IsQualificationTransitionSupported"},
+ {2520, nullptr, "IsQualificationTransitionSupportedByProcessId"},
+ {2521, nullptr, "GetRightsUserChangedEvent"},
{2800, nullptr, "GetApplicationIdOfPreomia"},
{3000, nullptr, "RegisterDeviceLockKey"},
{3001, nullptr, "UnregisterDeviceLockKey"},
diff --git a/src/core/hle/service/set/set_sys.cpp b/src/core/hle/service/set/set_sys.cpp
index 286578b17..38e6eae04 100644
--- a/src/core/hle/service/set/set_sys.cpp
+++ b/src/core/hle/service/set/set_sys.cpp
@@ -307,6 +307,8 @@ SET_SYS::SET_SYS(Core::System& system_) : ServiceFramework{system_, "set:sys"} {
{202, nullptr, "SetFieldTestingFlag"},
{203, nullptr, "GetPanelCrcMode"},
{204, nullptr, "SetPanelCrcMode"},
+ {205, nullptr, "GetNxControllerSettingsEx"},
+ {206, nullptr, "SetNxControllerSettingsEx"},
};
// clang-format on
diff --git a/src/core/hle/service/usb/usb.cpp b/src/core/hle/service/usb/usb.cpp
index 502dfbb4a..0747c33cd 100644
--- a/src/core/hle/service/usb/usb.cpp
+++ b/src/core/hle/service/usb/usb.cpp
@@ -17,34 +17,9 @@ public:
explicit IDsInterface(Core::System& system_) : ServiceFramework{system_, "IDsInterface"} {
// clang-format off
static const FunctionInfo functions[] = {
- {0, nullptr, "GetDsEndpoint"},
- {1, nullptr, "GetSetupEvent"},
- {2, nullptr, "Unknown2"},
- {3, nullptr, "EnableInterface"},
- {4, nullptr, "DisableInterface"},
- {5, nullptr, "CtrlInPostBufferAsync"},
- {6, nullptr, "CtrlOutPostBufferAsync"},
- {7, nullptr, "GetCtrlInCompletionEvent"},
- {8, nullptr, "GetCtrlInReportData"},
- {9, nullptr, "GetCtrlOutCompletionEvent"},
- {10, nullptr, "GetCtrlOutReportData"},
- {11, nullptr, "StallCtrl"},
- {12, nullptr, "AppendConfigurationData"},
- };
- // clang-format on
-
- RegisterHandlers(functions);
- }
-};
-
-class USB_DS final : public ServiceFramework<USB_DS> {
-public:
- explicit USB_DS(Core::System& system_) : ServiceFramework{system_, "usb:ds"} {
- // clang-format off
- static const FunctionInfo functions[] = {
{0, nullptr, "BindDevice"},
{1, nullptr, "BindClientProcess"},
- {2, nullptr, "GetDsInterface"},
+ {2, nullptr, "AddInterface"},
{3, nullptr, "GetStateChangeEvent"},
{4, nullptr, "GetState"},
{5, nullptr, "ClearDeviceData"},
@@ -62,6 +37,19 @@ public:
}
};
+class USB_DS final : public ServiceFramework<USB_DS> {
+public:
+ explicit USB_DS(Core::System& system_) : ServiceFramework{system_, "usb:ds"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "OpenDsService"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+};
+
class IClientEpSession final : public ServiceFramework<IClientEpSession> {
public:
explicit IClientEpSession(Core::System& system_)
@@ -120,7 +108,7 @@ public:
{5, nullptr, "DestroyInterfaceAvailableEvent"},
{6, nullptr, "GetInterfaceStateChangeEvent"},
{7, nullptr, "AcquireUsbIf"},
- {8, nullptr, "Unknown8"},
+ {8, nullptr, "ResetDevice"},
};
// clang-format on
diff --git a/src/core/hle/service/wlan/wlan.cpp b/src/core/hle/service/wlan/wlan.cpp
index 44957e01d..f10b8c853 100644
--- a/src/core/hle/service/wlan/wlan.cpp
+++ b/src/core/hle/service/wlan/wlan.cpp
@@ -53,6 +53,7 @@ public:
{35, nullptr, "Unknown35"},
{36, nullptr, "Unknown36"},
{37, nullptr, "Unknown37"},
+ {38, nullptr, "Unknown38"},
};
// clang-format on
@@ -117,7 +118,6 @@ public:
{49, nullptr, "Unknown49"},
{50, nullptr, "Unknown50"},
{51, nullptr, "Unknown51"},
- {52, nullptr, "Unknown52"},
};
// clang-format on
diff --git a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp
index bb7f1a0fd..e816a93ec 100644
--- a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp
+++ b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp
@@ -458,9 +458,10 @@ void EmitContext::DefineGenericOutput(size_t index, u32 invocations) {
std::string definition{fmt::format("layout(location={}", index)};
const u32 remainder{4 - element};
const TransformFeedbackVarying* xfb_varying{};
- if (!runtime_info.xfb_varyings.empty()) {
- xfb_varying = &runtime_info.xfb_varyings[base_index + element];
- xfb_varying = xfb_varying && xfb_varying->components > 0 ? xfb_varying : nullptr;
+ const size_t xfb_varying_index{base_index + element};
+ if (xfb_varying_index < runtime_info.xfb_varyings.size()) {
+ xfb_varying = &runtime_info.xfb_varyings[xfb_varying_index];
+ xfb_varying = xfb_varying->components > 0 ? xfb_varying : nullptr;
}
const u32 num_components{xfb_varying ? xfb_varying->components : remainder};
if (element > 0) {
diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp
index d3ba66569..cd90c084a 100644
--- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp
@@ -164,9 +164,10 @@ void DefineGenericOutput(EmitContext& ctx, size_t index, std::optional<u32> invo
while (element < 4) {
const u32 remainder{4 - element};
const TransformFeedbackVarying* xfb_varying{};
- if (!ctx.runtime_info.xfb_varyings.empty()) {
- xfb_varying = &ctx.runtime_info.xfb_varyings[base_attr_index + element];
- xfb_varying = xfb_varying && xfb_varying->components > 0 ? xfb_varying : nullptr;
+ const size_t xfb_varying_index{base_attr_index + element};
+ if (xfb_varying_index < ctx.runtime_info.xfb_varyings.size()) {
+ xfb_varying = &ctx.runtime_info.xfb_varyings[xfb_varying_index];
+ xfb_varying = xfb_varying->components > 0 ? xfb_varying : nullptr;
}
const u32 num_components{xfb_varying ? xfb_varying->components : remainder};
diff --git a/src/video_core/command_classes/codecs/codec.h b/src/video_core/command_classes/codecs/codec.h
index 13ed88382..de5672155 100644
--- a/src/video_core/command_classes/codecs/codec.h
+++ b/src/video_core/command_classes/codecs/codec.h
@@ -66,7 +66,7 @@ private:
bool initialized{};
NvdecCommon::VideoCodec current_codec{NvdecCommon::VideoCodec::None};
- AVCodec* av_codec{nullptr};
+ const AVCodec* av_codec{nullptr};
AVCodecContext* av_codec_ctx{nullptr};
AVBufferRef* av_gpu_decoder{nullptr};
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 33d50667a..8c370ff91 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -745,8 +745,7 @@ void Config::ReadUIValues() {
UISettings::values.theme =
ReadSetting(
QStringLiteral("theme"),
- QString::fromUtf8(
- UISettings::themes[static_cast<size_t>(UISettings::Theme::DarkColorful)].second))
+ QString::fromUtf8(UISettings::themes[static_cast<size_t>(default_theme)].second))
.toString();
ReadBasicSetting(UISettings::values.enable_discord_presence);
ReadBasicSetting(UISettings::values.select_user_on_boot);
@@ -1273,10 +1272,8 @@ void Config::SaveSystemValues() {
void Config::SaveUIValues() {
qt_config->beginGroup(QStringLiteral("UI"));
- WriteSetting(
- QStringLiteral("theme"), UISettings::values.theme,
- QString::fromUtf8(
- UISettings::themes[static_cast<size_t>(UISettings::Theme::DarkColorful)].second));
+ WriteSetting(QStringLiteral("theme"), UISettings::values.theme,
+ QString::fromUtf8(UISettings::themes[static_cast<size_t>(default_theme)].second));
WriteBasicSetting(UISettings::values.enable_discord_presence);
WriteBasicSetting(UISettings::values.select_user_on_boot);
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h
index d673c1cdc..8f4576def 100644
--- a/src/yuzu/configuration/config.h
+++ b/src/yuzu/configuration/config.h
@@ -48,6 +48,14 @@ public:
static const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> default_keyboard_mods;
static const std::array<UISettings::Shortcut, 21> default_hotkeys;
+ static constexpr UISettings::Theme default_theme{
+#ifdef _WIN32
+ UISettings::Theme::DarkColorful
+#else
+ UISettings::Theme::DefaultColorful
+#endif
+ };
+
private:
void Initialize(const std::string& config_name);