summaryrefslogtreecommitdiff
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/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/apm/apm_interface.cpp14
-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/yuzu/configuration/config.cpp9
-rw-r--r--src/yuzu/configuration/config.h8
18 files changed, 120 insertions, 59 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>
46} 46}
47 47
48template <typename T> 48template <typename T>
49requires std::is_unsigned_v<T>
50[[nodiscard]] constexpr bool IsPow2(T value) {
51 return std::has_single_bit(value);
52}
53
54template <typename T>
49requires std::is_integral_v<T> 55requires std::is_integral_v<T>
50[[nodiscard]] T NextPow2(T value) { 56[[nodiscard]] T NextPow2(T value) {
51 return static_cast<T>(1ULL << ((8U * sizeof(T)) - std::countl_zero(value - 1U))); 57 return static_cast<T>(1ULL << ((8U * sizeof(T)) - std::countl_zero(value - 1U)));
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>
37 {130, nullptr, "ActivateOpenContextRetention"}, 37 {130, nullptr, "ActivateOpenContextRetention"},
38 {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, 38 {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"},
39 {150, nullptr, "AuthenticateApplicationAsync"}, 39 {150, nullptr, "AuthenticateApplicationAsync"},
40 {151, nullptr, "Unknown151"}, 40 {151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
41 {152, nullptr, "Unknown152"}, 41 {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
42 {190, nullptr, "GetUserLastOpenedApplication"}, 42 {190, nullptr, "GetUserLastOpenedApplication"},
43 {191, nullptr, "ActivateOpenContextHolder"}, 43 {191, nullptr, "ActivateOpenContextHolder"},
44 {200, nullptr, "BeginUserRegistration"}, 44 {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>
37 {130, nullptr, "ActivateOpenContextRetention"}, 37 {130, nullptr, "ActivateOpenContextRetention"},
38 {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, 38 {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"},
39 {150, nullptr, "AuthenticateApplicationAsync"}, 39 {150, nullptr, "AuthenticateApplicationAsync"},
40 {151, nullptr, "Unknown151"}, 40 {151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
41 {152, nullptr, "Unknown152"}, 41 {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
42 {190, nullptr, "GetUserLastOpenedApplication"}, 42 {190, nullptr, "GetUserLastOpenedApplication"},
43 {191, nullptr, "ActivateOpenContextHolder"}, 43 {191, nullptr, "ActivateOpenContextHolder"},
44 {997, nullptr, "DebugInvalidateTokenCacheForUser"}, 44 {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"} {
37 {25, nullptr, "SetApplicationCecSettingsAndNotifyChanged"}, 37 {25, nullptr, "SetApplicationCecSettingsAndNotifyChanged"},
38 {26, nullptr, "GetOperationModeSystemInfo"}, 38 {26, nullptr, "GetOperationModeSystemInfo"},
39 {27, nullptr, "GetAppletFullAwakingSystemEvent"}, 39 {27, nullptr, "GetAppletFullAwakingSystemEvent"},
40 {28, nullptr, "CreateCradleFirmwareUpdater"},
40 }; 41 };
41 // clang-format on 42 // clang-format on
42 43
diff --git a/src/core/hle/service/apm/apm_interface.cpp b/src/core/hle/service/apm/apm_interface.cpp
index e58bad083..6163e3294 100644
--- a/src/core/hle/service/apm/apm_interface.cpp
+++ b/src/core/hle/service/apm/apm_interface.cpp
@@ -17,7 +17,7 @@ public:
17 static const FunctionInfo functions[] = { 17 static const FunctionInfo functions[] = {
18 {0, &ISession::SetPerformanceConfiguration, "SetPerformanceConfiguration"}, 18 {0, &ISession::SetPerformanceConfiguration, "SetPerformanceConfiguration"},
19 {1, &ISession::GetPerformanceConfiguration, "GetPerformanceConfiguration"}, 19 {1, &ISession::GetPerformanceConfiguration, "GetPerformanceConfiguration"},
20 {2, nullptr, "SetCpuOverclockEnabled"}, 20 {2, &ISession::SetCpuOverclockEnabled, "SetCpuOverclockEnabled"},
21 }; 21 };
22 RegisterHandlers(functions); 22 RegisterHandlers(functions);
23 } 23 }
@@ -47,6 +47,18 @@ private:
47 rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode)); 47 rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode));
48 } 48 }
49 49
50 void SetCpuOverclockEnabled(Kernel::HLERequestContext& ctx) {
51 IPC::RequestParser rp{ctx};
52
53 const auto cpu_overclock_enabled = rp.Pop<bool>();
54
55 LOG_WARNING(Service_APM, "(STUBBED) called, cpu_overclock_enabled={}",
56 cpu_overclock_enabled);
57
58 IPC::ResponseBuilder rb{ctx, 2};
59 rb.Push(ResultSuccess);
60 }
61
50 Controller& controller; 62 Controller& controller;
51}; 63};
52 64
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"} {
41 {27, nullptr, "SetVolumeMappingTableForDev"}, 41 {27, nullptr, "SetVolumeMappingTableForDev"},
42 {28, nullptr, "GetAudioOutputChannelCountForPlayReport"}, 42 {28, nullptr, "GetAudioOutputChannelCountForPlayReport"},
43 {29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, 43 {29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"},
44 {30, nullptr, "Unknown30"}, 44 {30, nullptr, "SetSpeakerAutoMuteEnabled"},
45 {31, nullptr, "Unknown31"}, 45 {31, nullptr, "IsSpeakerAutoMuteEnabled"},
46 {32, nullptr, "Unknown32"}, 46 {32, nullptr, "GetActiveOutputTarget"},
47 {33, nullptr, "Unknown33"}, 47 {33, nullptr, "GetTargetDeviceInfo"},
48 {34, nullptr, "Unknown34"}, 48 {34, nullptr, "AcquireTargetNotification"},
49 {10000, nullptr, "Unknown10000"}, 49 {10000, nullptr, "NotifyAudioOutputTargetForPlayReport"},
50 {10001, nullptr, "Unknown10001"}, 50 {10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"},
51 {10002, nullptr, "Unknown10002"}, 51 {10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"},
52 }; 52 };
53 // clang-format on 53 // clang-format on
54 54
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:
201 {62, nullptr, "Unknown62"}, 201 {62, nullptr, "Unknown62"},
202 {63, nullptr, "Unknown63"}, 202 {63, nullptr, "Unknown63"},
203 {64, nullptr, "Unknown64"}, 203 {64, nullptr, "Unknown64"},
204 {65, nullptr, "Unknown65"},
205 {66, nullptr, "Unknown66"},
206 {67, nullptr, "Unknown67"},
207 {68, nullptr, "Unknown68"},
208 {69, nullptr, "Unknown69"},
209 {70, nullptr, "Unknown70"},
210 {71, nullptr, "Unknown71"},
211 {72, nullptr, "Unknown72"},
212 {73, nullptr, "Unknown73"},
213 {74, nullptr, "Unknown74"},
214 {75, nullptr, "Unknown75"},
215 {76, nullptr, "Unknown76"},
216 {100, nullptr, "Unknown100"},
217 {101, nullptr, "Unknown101"},
218 {110, nullptr, "Unknown102"},
219 {111, nullptr, "Unknown103"},
204 }; 220 };
205 // clang-format on 221 // clang-format on
206 222
@@ -249,6 +265,20 @@ public:
249 {7, nullptr, "AcquireRadioEvent"}, 265 {7, nullptr, "AcquireRadioEvent"},
250 {8, nullptr, "AcquireGamepadPairingEvent"}, 266 {8, nullptr, "AcquireGamepadPairingEvent"},
251 {9, nullptr, "IsGamepadPairingStarted"}, 267 {9, nullptr, "IsGamepadPairingStarted"},
268 {10, nullptr, "StartAudioDeviceDiscovery"},
269 {11, nullptr, "StopAudioDeviceDiscovery"},
270 {12, nullptr, "IsDiscoveryingAudioDevice"},
271 {13, nullptr, "GetDiscoveredAudioDevice"},
272 {14, nullptr, "AcquireAudioDeviceConnectionEvent"},
273 {15, nullptr, "ConnectAudioDevice"},
274 {16, nullptr, "IsConnectingAudioDevice"},
275 {17, nullptr, "GetConnectedAudioDevices"},
276 {18, nullptr, "DisconnectAudioDevice"},
277 {19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"},
278 {20, nullptr, "GetPairedAudioDevices"},
279 {21, nullptr, "RemoveAudioDevicePairing"},
280 {22, nullptr, "RequestAudioDeviceConnectionRejection"},
281 {23, nullptr, "CancelAudioDeviceConnectionRejection"}
252 }; 282 };
253 // clang-format on 283 // clang-format on
254 284
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_)
744 {203, &FSP_SRV::OpenPatchDataStorageByCurrentProcess, "OpenPatchDataStorageByCurrentProcess"}, 744 {203, &FSP_SRV::OpenPatchDataStorageByCurrentProcess, "OpenPatchDataStorageByCurrentProcess"},
745 {204, nullptr, "OpenDataFileSystemByProgramIndex"}, 745 {204, nullptr, "OpenDataFileSystemByProgramIndex"},
746 {205, &FSP_SRV::OpenDataStorageWithProgramIndex, "OpenDataStorageWithProgramIndex"}, 746 {205, &FSP_SRV::OpenDataStorageWithProgramIndex, "OpenDataStorageWithProgramIndex"},
747 {206, nullptr, "OpenDataStorageByPath"},
747 {400, nullptr, "OpenDeviceOperator"}, 748 {400, nullptr, "OpenDeviceOperator"},
748 {500, nullptr, "OpenSdCardDetectionEventNotifier"}, 749 {500, nullptr, "OpenSdCardDetectionEventNotifier"},
749 {501, nullptr, "OpenGameCardDetectionEventNotifier"}, 750 {501, nullptr, "OpenGameCardDetectionEventNotifier"},
@@ -796,6 +797,8 @@ FSP_SRV::FSP_SRV(Core::System& system_)
796 {1014, nullptr, "OutputMultiProgramTagAccessLog"}, 797 {1014, nullptr, "OutputMultiProgramTagAccessLog"},
797 {1016, nullptr, "FlushAccessLogOnSdCard"}, 798 {1016, nullptr, "FlushAccessLogOnSdCard"},
798 {1017, nullptr, "OutputApplicationInfoAccessLog"}, 799 {1017, nullptr, "OutputApplicationInfoAccessLog"},
800 {1018, nullptr, "SetDebugOption"},
801 {1019, nullptr, "UnsetDebugOption"},
799 {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"}, 802 {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
800 {1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"}, 803 {1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
801 {1200, &FSP_SRV::OpenMultiCommitManager, "OpenMultiCommitManager"}, 804 {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:
27 {10101, &IFriendService::GetFriendList, "GetFriendList"}, 27 {10101, &IFriendService::GetFriendList, "GetFriendList"},
28 {10102, nullptr, "UpdateFriendInfo"}, 28 {10102, nullptr, "UpdateFriendInfo"},
29 {10110, nullptr, "GetFriendProfileImage"}, 29 {10110, nullptr, "GetFriendProfileImage"},
30 {10120, nullptr, "Unknown10120"}, 30 {10120, nullptr, "IsFriendListCacheAvailable"},
31 {10121, nullptr, "Unknown10121"}, 31 {10121, nullptr, "EnsureFriendListAvailable"},
32 {10200, nullptr, "SendFriendRequestForApplication"}, 32 {10200, nullptr, "SendFriendRequestForApplication"},
33 {10211, nullptr, "AddFacedFriendRequestForApplication"}, 33 {10211, nullptr, "AddFacedFriendRequestForApplication"},
34 {10400, &IFriendService::GetBlockedUserListIds, "GetBlockedUserListIds"}, 34 {10400, &IFriendService::GetBlockedUserListIds, "GetBlockedUserListIds"},
35 {10420, nullptr, "Unknown10420"}, 35 {10420, nullptr, "IsBlockedUserListCacheAvailable"},
36 {10421, nullptr, "Unknown10421"}, 36 {10421, nullptr, "EnsureBlockedUserListAvailable"},
37 {10500, nullptr, "GetProfileList"}, 37 {10500, nullptr, "GetProfileList"},
38 {10600, nullptr, "DeclareOpenOnlinePlaySession"}, 38 {10600, nullptr, "DeclareOpenOnlinePlaySession"},
39 {10601, &IFriendService::DeclareCloseOnlinePlaySession, "DeclareCloseOnlinePlaySession"}, 39 {10601, &IFriendService::DeclareCloseOnlinePlaySession, "DeclareCloseOnlinePlaySession"},
@@ -103,8 +103,8 @@ public:
103 {30900, nullptr, "SendFriendInvitation"}, 103 {30900, nullptr, "SendFriendInvitation"},
104 {30910, nullptr, "ReadFriendInvitation"}, 104 {30910, nullptr, "ReadFriendInvitation"},
105 {30911, nullptr, "ReadAllFriendInvitations"}, 105 {30911, nullptr, "ReadAllFriendInvitations"},
106 {40100, nullptr, "Unknown40100"}, 106 {40100, nullptr, "DeleteFriendListCache"},
107 {40400, nullptr, "Unknown40400"}, 107 {40400, nullptr, "DeleteBlockedUserListCache"},
108 {49900, nullptr, "DeleteNetworkServiceAccountCache"}, 108 {49900, nullptr, "DeleteNetworkServiceAccountCache"},
109 }; 109 };
110 // clang-format on 110 // 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:
211 {127, nullptr, "Unknown127"}, 211 {127, nullptr, "Unknown127"},
212 {128, nullptr, "Unknown128"}, 212 {128, nullptr, "Unknown128"},
213 {129, nullptr, "Unknown129"}, 213 {129, nullptr, "Unknown129"},
214 {130, nullptr, "Unknown130"},
215 {131, nullptr, "Unknown131"},
216 {132, nullptr, "Unknown132"},
217 {133, nullptr, "Unknown133"},
218 {134, nullptr, "Unknown134"},
214 }; 219 };
215 // clang-format on 220 // clang-format on
216 221
@@ -287,6 +292,7 @@ public:
287 {502, nullptr, "RequestDownloadTicketForPrepurchasedContents"}, 292 {502, nullptr, "RequestDownloadTicketForPrepurchasedContents"},
288 {503, nullptr, "RequestSyncTicket"}, 293 {503, nullptr, "RequestSyncTicket"},
289 {504, nullptr, "RequestDownloadTicketForPrepurchasedContents2"}, 294 {504, nullptr, "RequestDownloadTicketForPrepurchasedContents2"},
295 {505, nullptr, "RequestDownloadTicketForPrepurchasedContentsForAccount"},
290 }; 296 };
291 // clang-format on 297 // clang-format on
292 298
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_
158 {605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"}, 158 {605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"},
159 {606, nullptr, "GetContentMetaStorage"}, 159 {606, nullptr, "GetContentMetaStorage"},
160 {607, nullptr, "ListAvailableAddOnContent"}, 160 {607, nullptr, "ListAvailableAddOnContent"},
161 {609, nullptr, "ListAvailabilityAssuredAddOnContent"},
161 {700, nullptr, "PushDownloadTaskList"}, 162 {700, nullptr, "PushDownloadTaskList"},
162 {701, nullptr, "ClearTaskStatusList"}, 163 {701, nullptr, "ClearTaskStatusList"},
163 {702, nullptr, "RequestDownloadTaskList"}, 164 {702, nullptr, "RequestDownloadTaskList"},
@@ -289,6 +290,11 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
289 {2514, nullptr, "ClearTaskOfAsyncTaskManager"}, 290 {2514, nullptr, "ClearTaskOfAsyncTaskManager"},
290 {2515, nullptr, "CleanupAllPlaceHolderAndFragmentsIfNoTask"}, 291 {2515, nullptr, "CleanupAllPlaceHolderAndFragmentsIfNoTask"},
291 {2516, nullptr, "EnsureApplicationCertificate"}, 292 {2516, nullptr, "EnsureApplicationCertificate"},
293 {2517, nullptr, "CreateApplicationInstance"},
294 {2518, nullptr, "UpdateQualificationForDebug"},
295 {2519, nullptr, "IsQualificationTransitionSupported"},
296 {2520, nullptr, "IsQualificationTransitionSupportedByProcessId"},
297 {2521, nullptr, "GetRightsUserChangedEvent"},
292 {2800, nullptr, "GetApplicationIdOfPreomia"}, 298 {2800, nullptr, "GetApplicationIdOfPreomia"},
293 {3000, nullptr, "RegisterDeviceLockKey"}, 299 {3000, nullptr, "RegisterDeviceLockKey"},
294 {3001, nullptr, "UnregisterDeviceLockKey"}, 300 {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"} {
307 {202, nullptr, "SetFieldTestingFlag"}, 307 {202, nullptr, "SetFieldTestingFlag"},
308 {203, nullptr, "GetPanelCrcMode"}, 308 {203, nullptr, "GetPanelCrcMode"},
309 {204, nullptr, "SetPanelCrcMode"}, 309 {204, nullptr, "SetPanelCrcMode"},
310 {205, nullptr, "GetNxControllerSettingsEx"},
311 {206, nullptr, "SetNxControllerSettingsEx"},
310 }; 312 };
311 // clang-format on 313 // clang-format on
312 314
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:
17 explicit IDsInterface(Core::System& system_) : ServiceFramework{system_, "IDsInterface"} { 17 explicit IDsInterface(Core::System& system_) : ServiceFramework{system_, "IDsInterface"} {
18 // clang-format off 18 // clang-format off
19 static const FunctionInfo functions[] = { 19 static const FunctionInfo functions[] = {
20 {0, nullptr, "GetDsEndpoint"},
21 {1, nullptr, "GetSetupEvent"},
22 {2, nullptr, "Unknown2"},
23 {3, nullptr, "EnableInterface"},
24 {4, nullptr, "DisableInterface"},
25 {5, nullptr, "CtrlInPostBufferAsync"},
26 {6, nullptr, "CtrlOutPostBufferAsync"},
27 {7, nullptr, "GetCtrlInCompletionEvent"},
28 {8, nullptr, "GetCtrlInReportData"},
29 {9, nullptr, "GetCtrlOutCompletionEvent"},
30 {10, nullptr, "GetCtrlOutReportData"},
31 {11, nullptr, "StallCtrl"},
32 {12, nullptr, "AppendConfigurationData"},
33 };
34 // clang-format on
35
36 RegisterHandlers(functions);
37 }
38};
39
40class USB_DS final : public ServiceFramework<USB_DS> {
41public:
42 explicit USB_DS(Core::System& system_) : ServiceFramework{system_, "usb:ds"} {
43 // clang-format off
44 static const FunctionInfo functions[] = {
45 {0, nullptr, "BindDevice"}, 20 {0, nullptr, "BindDevice"},
46 {1, nullptr, "BindClientProcess"}, 21 {1, nullptr, "BindClientProcess"},
47 {2, nullptr, "GetDsInterface"}, 22 {2, nullptr, "AddInterface"},
48 {3, nullptr, "GetStateChangeEvent"}, 23 {3, nullptr, "GetStateChangeEvent"},
49 {4, nullptr, "GetState"}, 24 {4, nullptr, "GetState"},
50 {5, nullptr, "ClearDeviceData"}, 25 {5, nullptr, "ClearDeviceData"},
@@ -62,6 +37,19 @@ public:
62 } 37 }
63}; 38};
64 39
40class USB_DS final : public ServiceFramework<USB_DS> {
41public:
42 explicit USB_DS(Core::System& system_) : ServiceFramework{system_, "usb:ds"} {
43 // clang-format off
44 static const FunctionInfo functions[] = {
45 {0, nullptr, "OpenDsService"},
46 };
47 // clang-format on
48
49 RegisterHandlers(functions);
50 }
51};
52
65class IClientEpSession final : public ServiceFramework<IClientEpSession> { 53class IClientEpSession final : public ServiceFramework<IClientEpSession> {
66public: 54public:
67 explicit IClientEpSession(Core::System& system_) 55 explicit IClientEpSession(Core::System& system_)
@@ -120,7 +108,7 @@ public:
120 {5, nullptr, "DestroyInterfaceAvailableEvent"}, 108 {5, nullptr, "DestroyInterfaceAvailableEvent"},
121 {6, nullptr, "GetInterfaceStateChangeEvent"}, 109 {6, nullptr, "GetInterfaceStateChangeEvent"},
122 {7, nullptr, "AcquireUsbIf"}, 110 {7, nullptr, "AcquireUsbIf"},
123 {8, nullptr, "Unknown8"}, 111 {8, nullptr, "ResetDevice"},
124 }; 112 };
125 // clang-format on 113 // clang-format on
126 114
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:
53 {35, nullptr, "Unknown35"}, 53 {35, nullptr, "Unknown35"},
54 {36, nullptr, "Unknown36"}, 54 {36, nullptr, "Unknown36"},
55 {37, nullptr, "Unknown37"}, 55 {37, nullptr, "Unknown37"},
56 {38, nullptr, "Unknown38"},
56 }; 57 };
57 // clang-format on 58 // clang-format on
58 59
@@ -117,7 +118,6 @@ public:
117 {49, nullptr, "Unknown49"}, 118 {49, nullptr, "Unknown49"},
118 {50, nullptr, "Unknown50"}, 119 {50, nullptr, "Unknown50"},
119 {51, nullptr, "Unknown51"}, 120 {51, nullptr, "Unknown51"},
120 {52, nullptr, "Unknown52"},
121 }; 121 };
122 // clang-format on 122 // clang-format on
123 123
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) {
458 std::string definition{fmt::format("layout(location={}", index)}; 458 std::string definition{fmt::format("layout(location={}", index)};
459 const u32 remainder{4 - element}; 459 const u32 remainder{4 - element};
460 const TransformFeedbackVarying* xfb_varying{}; 460 const TransformFeedbackVarying* xfb_varying{};
461 if (!runtime_info.xfb_varyings.empty()) { 461 const size_t xfb_varying_index{base_index + element};
462 xfb_varying = &runtime_info.xfb_varyings[base_index + element]; 462 if (xfb_varying_index < runtime_info.xfb_varyings.size()) {
463 xfb_varying = xfb_varying && xfb_varying->components > 0 ? xfb_varying : nullptr; 463 xfb_varying = &runtime_info.xfb_varyings[xfb_varying_index];
464 xfb_varying = xfb_varying->components > 0 ? xfb_varying : nullptr;
464 } 465 }
465 const u32 num_components{xfb_varying ? xfb_varying->components : remainder}; 466 const u32 num_components{xfb_varying ? xfb_varying->components : remainder};
466 if (element > 0) { 467 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
164 while (element < 4) { 164 while (element < 4) {
165 const u32 remainder{4 - element}; 165 const u32 remainder{4 - element};
166 const TransformFeedbackVarying* xfb_varying{}; 166 const TransformFeedbackVarying* xfb_varying{};
167 if (!ctx.runtime_info.xfb_varyings.empty()) { 167 const size_t xfb_varying_index{base_attr_index + element};
168 xfb_varying = &ctx.runtime_info.xfb_varyings[base_attr_index + element]; 168 if (xfb_varying_index < ctx.runtime_info.xfb_varyings.size()) {
169 xfb_varying = xfb_varying && xfb_varying->components > 0 ? xfb_varying : nullptr; 169 xfb_varying = &ctx.runtime_info.xfb_varyings[xfb_varying_index];
170 xfb_varying = xfb_varying->components > 0 ? xfb_varying : nullptr;
170 } 171 }
171 const u32 num_components{xfb_varying ? xfb_varying->components : remainder}; 172 const u32 num_components{xfb_varying ? xfb_varying->components : remainder};
172 173
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() {
745 UISettings::values.theme = 745 UISettings::values.theme =
746 ReadSetting( 746 ReadSetting(
747 QStringLiteral("theme"), 747 QStringLiteral("theme"),
748 QString::fromUtf8( 748 QString::fromUtf8(UISettings::themes[static_cast<size_t>(default_theme)].second))
749 UISettings::themes[static_cast<size_t>(UISettings::Theme::DarkColorful)].second))
750 .toString(); 749 .toString();
751 ReadBasicSetting(UISettings::values.enable_discord_presence); 750 ReadBasicSetting(UISettings::values.enable_discord_presence);
752 ReadBasicSetting(UISettings::values.select_user_on_boot); 751 ReadBasicSetting(UISettings::values.select_user_on_boot);
@@ -1273,10 +1272,8 @@ void Config::SaveSystemValues() {
1273void Config::SaveUIValues() { 1272void Config::SaveUIValues() {
1274 qt_config->beginGroup(QStringLiteral("UI")); 1273 qt_config->beginGroup(QStringLiteral("UI"));
1275 1274
1276 WriteSetting( 1275 WriteSetting(QStringLiteral("theme"), UISettings::values.theme,
1277 QStringLiteral("theme"), UISettings::values.theme, 1276 QString::fromUtf8(UISettings::themes[static_cast<size_t>(default_theme)].second));
1278 QString::fromUtf8(
1279 UISettings::themes[static_cast<size_t>(UISettings::Theme::DarkColorful)].second));
1280 WriteBasicSetting(UISettings::values.enable_discord_presence); 1277 WriteBasicSetting(UISettings::values.enable_discord_presence);
1281 WriteBasicSetting(UISettings::values.select_user_on_boot); 1278 WriteBasicSetting(UISettings::values.select_user_on_boot);
1282 1279
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:
48 static const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> default_keyboard_mods; 48 static const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> default_keyboard_mods;
49 static const std::array<UISettings::Shortcut, 21> default_hotkeys; 49 static const std::array<UISettings::Shortcut, 21> default_hotkeys;
50 50
51 static constexpr UISettings::Theme default_theme{
52#ifdef _WIN32
53 UISettings::Theme::DarkColorful
54#else
55 UISettings::Theme::DefaultColorful
56#endif
57 };
58
51private: 59private:
52 void Initialize(const std::string& config_name); 60 void Initialize(const std::string& config_name);
53 61