set_sys.cpp 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. // Copyright 2018 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "common/logging/log.h"
  5. #include "core/hle/ipc_helpers.h"
  6. #include "core/hle/kernel/client_port.h"
  7. #include "core/hle/service/set/set_sys.h"
  8. namespace Service::Set {
  9. void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) {
  10. LOG_DEBUG(Service_SET, "called");
  11. IPC::ResponseBuilder rb{ctx, 3};
  12. rb.Push(RESULT_SUCCESS);
  13. rb.PushEnum(color_set);
  14. }
  15. void SET_SYS::SetColorSetId(Kernel::HLERequestContext& ctx) {
  16. LOG_DEBUG(Service_SET, "called");
  17. IPC::RequestParser rp{ctx};
  18. color_set = rp.PopEnum<ColorSet>();
  19. IPC::ResponseBuilder rb{ctx, 2};
  20. rb.Push(RESULT_SUCCESS);
  21. }
  22. SET_SYS::SET_SYS() : ServiceFramework("set:sys") {
  23. static const FunctionInfo functions[] = {
  24. {0, nullptr, "SetLanguageCode"},
  25. {1, nullptr, "SetNetworkSettings"},
  26. {2, nullptr, "GetNetworkSettings"},
  27. {3, nullptr, "GetFirmwareVersion"},
  28. {4, nullptr, "GetFirmwareVersion2"},
  29. {5, nullptr, "GetFirmwareVersionDigest"},
  30. {7, nullptr, "GetLockScreenFlag"},
  31. {8, nullptr, "SetLockScreenFlag"},
  32. {9, nullptr, "GetBacklightSettings"},
  33. {10, nullptr, "SetBacklightSettings"},
  34. {11, nullptr, "SetBluetoothDevicesSettings"},
  35. {12, nullptr, "GetBluetoothDevicesSettings"},
  36. {13, nullptr, "GetExternalSteadyClockSourceId"},
  37. {14, nullptr, "SetExternalSteadyClockSourceId"},
  38. {15, nullptr, "GetUserSystemClockContext"},
  39. {16, nullptr, "SetUserSystemClockContext"},
  40. {17, nullptr, "GetAccountSettings"},
  41. {18, nullptr, "SetAccountSettings"},
  42. {19, nullptr, "GetAudioVolume"},
  43. {20, nullptr, "SetAudioVolume"},
  44. {21, nullptr, "GetEulaVersions"},
  45. {22, nullptr, "SetEulaVersions"},
  46. {23, &SET_SYS::GetColorSetId, "GetColorSetId"},
  47. {24, &SET_SYS::SetColorSetId, "SetColorSetId"},
  48. {25, nullptr, "GetConsoleInformationUploadFlag"},
  49. {26, nullptr, "SetConsoleInformationUploadFlag"},
  50. {27, nullptr, "GetAutomaticApplicationDownloadFlag"},
  51. {28, nullptr, "SetAutomaticApplicationDownloadFlag"},
  52. {29, nullptr, "GetNotificationSettings"},
  53. {30, nullptr, "SetNotificationSettings"},
  54. {31, nullptr, "GetAccountNotificationSettings"},
  55. {32, nullptr, "SetAccountNotificationSettings"},
  56. {35, nullptr, "GetVibrationMasterVolume"},
  57. {36, nullptr, "SetVibrationMasterVolume"},
  58. {37, nullptr, "GetSettingsItemValueSize"},
  59. {38, nullptr, "GetSettingsItemValue"},
  60. {39, nullptr, "GetTvSettings"},
  61. {40, nullptr, "SetTvSettings"},
  62. {41, nullptr, "GetEdid"},
  63. {42, nullptr, "SetEdid"},
  64. {43, nullptr, "GetAudioOutputMode"},
  65. {44, nullptr, "SetAudioOutputMode"},
  66. {45, nullptr, "IsForceMuteOnHeadphoneRemoved"},
  67. {46, nullptr, "SetForceMuteOnHeadphoneRemoved"},
  68. {47, nullptr, "GetQuestFlag"},
  69. {48, nullptr, "SetQuestFlag"},
  70. {49, nullptr, "GetDataDeletionSettings"},
  71. {50, nullptr, "SetDataDeletionSettings"},
  72. {51, nullptr, "GetInitialSystemAppletProgramId"},
  73. {52, nullptr, "GetOverlayDispProgramId"},
  74. {53, nullptr, "GetDeviceTimeZoneLocationName"},
  75. {54, nullptr, "SetDeviceTimeZoneLocationName"},
  76. {55, nullptr, "GetWirelessCertificationFileSize"},
  77. {56, nullptr, "GetWirelessCertificationFile"},
  78. {57, nullptr, "SetRegionCode"},
  79. {58, nullptr, "GetNetworkSystemClockContext"},
  80. {59, nullptr, "SetNetworkSystemClockContext"},
  81. {60, nullptr, "IsUserSystemClockAutomaticCorrectionEnabled"},
  82. {61, nullptr, "SetUserSystemClockAutomaticCorrectionEnabled"},
  83. {62, nullptr, "GetDebugModeFlag"},
  84. {63, nullptr, "GetPrimaryAlbumStorage"},
  85. {64, nullptr, "SetPrimaryAlbumStorage"},
  86. {65, nullptr, "GetUsb30EnableFlag"},
  87. {66, nullptr, "SetUsb30EnableFlag"},
  88. {67, nullptr, "GetBatteryLot"},
  89. {68, nullptr, "GetSerialNumber"},
  90. {69, nullptr, "GetNfcEnableFlag"},
  91. {70, nullptr, "SetNfcEnableFlag"},
  92. {71, nullptr, "GetSleepSettings"},
  93. {72, nullptr, "SetSleepSettings"},
  94. {73, nullptr, "GetWirelessLanEnableFlag"},
  95. {74, nullptr, "SetWirelessLanEnableFlag"},
  96. {75, nullptr, "GetInitialLaunchSettings"},
  97. {76, nullptr, "SetInitialLaunchSettings"},
  98. {77, nullptr, "GetDeviceNickName"},
  99. {78, nullptr, "SetDeviceNickName"},
  100. {79, nullptr, "GetProductModel"},
  101. {80, nullptr, "GetLdnChannel"},
  102. {81, nullptr, "SetLdnChannel"},
  103. {82, nullptr, "AcquireTelemetryDirtyFlagEventHandle"},
  104. {83, nullptr, "GetTelemetryDirtyFlags"},
  105. {84, nullptr, "GetPtmBatteryLot"},
  106. {85, nullptr, "SetPtmBatteryLot"},
  107. {86, nullptr, "GetPtmFuelGaugeParameter"},
  108. {87, nullptr, "SetPtmFuelGaugeParameter"},
  109. {88, nullptr, "GetBluetoothEnableFlag"},
  110. {89, nullptr, "SetBluetoothEnableFlag"},
  111. {90, nullptr, "GetMiiAuthorId"},
  112. {91, nullptr, "SetShutdownRtcValue"},
  113. {92, nullptr, "GetShutdownRtcValue"},
  114. {93, nullptr, "AcquireFatalDirtyFlagEventHandle"},
  115. {94, nullptr, "GetFatalDirtyFlags"},
  116. {95, nullptr, "GetAutoUpdateEnableFlag"},
  117. {96, nullptr, "SetAutoUpdateEnableFlag"},
  118. {97, nullptr, "GetNxControllerSettings"},
  119. {98, nullptr, "SetNxControllerSettings"},
  120. {99, nullptr, "GetBatteryPercentageFlag"},
  121. {100, nullptr, "SetBatteryPercentageFlag"},
  122. {101, nullptr, "GetExternalRtcResetFlag"},
  123. {102, nullptr, "SetExternalRtcResetFlag"},
  124. {103, nullptr, "GetUsbFullKeyEnableFlag"},
  125. {104, nullptr, "SetUsbFullKeyEnableFlag"},
  126. {105, nullptr, "SetExternalSteadyClockInternalOffset"},
  127. {106, nullptr, "GetExternalSteadyClockInternalOffset"},
  128. {107, nullptr, "GetBacklightSettingsEx"},
  129. {108, nullptr, "SetBacklightSettingsEx"},
  130. {109, nullptr, "GetHeadphoneVolumeWarningCount"},
  131. {110, nullptr, "SetHeadphoneVolumeWarningCount"},
  132. {111, nullptr, "GetBluetoothAfhEnableFlag"},
  133. {112, nullptr, "SetBluetoothAfhEnableFlag"},
  134. {113, nullptr, "GetBluetoothBoostEnableFlag"},
  135. {114, nullptr, "SetBluetoothBoostEnableFlag"},
  136. {115, nullptr, "GetInRepairProcessEnableFlag"},
  137. {116, nullptr, "SetInRepairProcessEnableFlag"},
  138. {117, nullptr, "GetHeadphoneVolumeUpdateFlag"},
  139. {118, nullptr, "SetHeadphoneVolumeUpdateFlag"},
  140. {119, nullptr, "NeedsToUpdateHeadphoneVolume"},
  141. {120, nullptr, "GetPushNotificationActivityModeOnSleep"},
  142. {121, nullptr, "SetPushNotificationActivityModeOnSleep"},
  143. {122, nullptr, "GetServiceDiscoveryControlSettings"},
  144. {123, nullptr, "SetServiceDiscoveryControlSettings"},
  145. {124, nullptr, "GetErrorReportSharePermission"},
  146. {125, nullptr, "SetErrorReportSharePermission"},
  147. {126, nullptr, "GetAppletLaunchFlags"},
  148. {127, nullptr, "SetAppletLaunchFlags"},
  149. {128, nullptr, "GetConsoleSixAxisSensorAccelerationBias"},
  150. {129, nullptr, "SetConsoleSixAxisSensorAccelerationBias"},
  151. {130, nullptr, "GetConsoleSixAxisSensorAngularVelocityBias"},
  152. {131, nullptr, "SetConsoleSixAxisSensorAngularVelocityBias"},
  153. {132, nullptr, "GetConsoleSixAxisSensorAccelerationGain"},
  154. {133, nullptr, "SetConsoleSixAxisSensorAccelerationGain"},
  155. {134, nullptr, "GetConsoleSixAxisSensorAngularVelocityGain"},
  156. {135, nullptr, "SetConsoleSixAxisSensorAngularVelocityGain"},
  157. {136, nullptr, "GetKeyboardLayout"},
  158. {137, nullptr, "SetKeyboardLayout"},
  159. {138, nullptr, "GetWebInspectorFlag"},
  160. {139, nullptr, "GetAllowedSslHosts"},
  161. {140, nullptr, "GetHostFsMountPoint"},
  162. {141, nullptr, "GetRequiresRunRepairTimeReviser"},
  163. {142, nullptr, "SetRequiresRunRepairTimeReviser"},
  164. {143, nullptr, "SetBlePairingSettings"},
  165. {144, nullptr, "GetBlePairingSettings"},
  166. {145, nullptr, "GetConsoleSixAxisSensorAngularVelocityTimeBias"},
  167. {146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"},
  168. {147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"},
  169. {148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"},
  170. {149, nullptr, "GetRebootlessSystemUpdateVersion"},
  171. };
  172. RegisterHandlers(functions);
  173. }
  174. SET_SYS::~SET_SYS() = default;
  175. } // namespace Service::Set