diff options
| author | 2016-10-27 09:29:05 +0300 | |
|---|---|---|
| committer | 2016-11-02 09:38:44 +0300 | |
| commit | 5872abeab920257cbbd02c58a19440bc8597a1e9 (patch) | |
| tree | 01fd2377d6eb8d2f398081fe29a15290c1730b6a | |
| parent | AC_U: Stub functions, used if EULA agreed (diff) | |
| download | yuzu-5872abeab920257cbbd02c58a19440bc8597a1e9.tar.gz yuzu-5872abeab920257cbbd02c58a19440bc8597a1e9.tar.xz yuzu-5872abeab920257cbbd02c58a19440bc8597a1e9.zip | |
Rename AcConfig, change types u8 to u32
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/ac_u.cpp | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cpp index 86a2a1d3e..bbf743c2e 100644 --- a/src/core/hle/service/ac_u.cpp +++ b/src/core/hle/service/ac_u.cpp | |||
| @@ -11,7 +11,11 @@ | |||
| 11 | 11 | ||
| 12 | namespace AC_U { | 12 | namespace AC_U { |
| 13 | 13 | ||
| 14 | static struct AcConfig { u8 data[0x200]; } default_config = {}; | 14 | struct ACConfig { |
| 15 | std::array<u8, 0x200> data; | ||
| 16 | }; | ||
| 17 | |||
| 18 | static ACConfig default_config = {}; | ||
| 15 | 19 | ||
| 16 | static bool ac_connected; | 20 | static bool ac_connected; |
| 17 | 21 | ||
| @@ -22,8 +26,8 @@ static Kernel::SharedPtr<Kernel::Event> disconnect_event; | |||
| 22 | /** | 26 | /** |
| 23 | * AC_U::CreateDefaultConfig service function | 27 | * AC_U::CreateDefaultConfig service function |
| 24 | * Inputs: | 28 | * Inputs: |
| 25 | * 64 : AcConfig size << 14 | 2 | 29 | * 64 : ACConfig size << 14 | 2 |
| 26 | * 65 : pointer to AcConfig struct | 30 | * 65 : pointer to ACConfig struct |
| 27 | * Outputs: | 31 | * Outputs: |
| 28 | * 1 : Result of function, 0 on success, otherwise error code | 32 | * 1 : Result of function, 0 on success, otherwise error code |
| 29 | */ | 33 | */ |
| @@ -32,10 +36,10 @@ static void CreateDefaultConfig(Service::Interface* self) { | |||
| 32 | 36 | ||
| 33 | u32 ac_config_addr = cmd_buff[65]; | 37 | u32 ac_config_addr = cmd_buff[65]; |
| 34 | 38 | ||
| 35 | ASSERT_MSG(cmd_buff[64] == (sizeof(AcConfig) << 14 | 2), | 39 | ASSERT_MSG(cmd_buff[64] == (sizeof(ACConfig) << 14 | 2), |
| 36 | "Output buffer size not equal AcConfig size"); | 40 | "Output buffer size not equal ACConfig size"); |
| 37 | 41 | ||
| 38 | Memory::WriteBlock(ac_config_addr, &default_config, sizeof(AcConfig)); | 42 | Memory::WriteBlock(ac_config_addr, &default_config, sizeof(ACConfig)); |
| 39 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | 43 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error |
| 40 | 44 | ||
| 41 | LOG_WARNING(Service_AC, "(STUBBED) called"); | 45 | LOG_WARNING(Service_AC, "(STUBBED) called"); |
| @@ -47,8 +51,8 @@ static void CreateDefaultConfig(Service::Interface* self) { | |||
| 47 | * 1 : ProcessId Header | 51 | * 1 : ProcessId Header |
| 48 | * 3 : Copy Handle Header | 52 | * 3 : Copy Handle Header |
| 49 | * 4 : Connection Event handle | 53 | * 4 : Connection Event handle |
| 50 | * 5 : AcConfig size << 14 | 2 | 54 | * 5 : ACConfig size << 14 | 2 |
| 51 | * 6 : pointer to AcConfig struct | 55 | * 6 : pointer to ACConfig struct |
| 52 | * Outputs: | 56 | * Outputs: |
| 53 | * 1 : Result of function, 0 on success, otherwise error code | 57 | * 1 : Result of function, 0 on success, otherwise error code |
| 54 | */ | 58 | */ |
| @@ -145,8 +149,8 @@ static void GetWifiStatus(Service::Interface* self) { | |||
| 145 | /** | 149 | /** |
| 146 | * AC_U::GetInfraPriority service function | 150 | * AC_U::GetInfraPriority service function |
| 147 | * Inputs: | 151 | * Inputs: |
| 148 | * 1 : AcConfig size << 14 | 2 | 152 | * 1 : ACConfig size << 14 | 2 |
| 149 | * 2 : pointer to AcConfig struct | 153 | * 2 : pointer to ACConfig struct |
| 150 | * Outputs: | 154 | * Outputs: |
| 151 | * 1 : Result of function, 0 on success, otherwise error code | 155 | * 1 : Result of function, 0 on success, otherwise error code |
| 152 | * 2 : Infra Priority | 156 | * 2 : Infra Priority |
| @@ -165,10 +169,10 @@ static void GetInfraPriority(Service::Interface* self) { | |||
| 165 | * Inputs: | 169 | * Inputs: |
| 166 | * 1 : Eula Version major | 170 | * 1 : Eula Version major |
| 167 | * 2 : Eula Version minor | 171 | * 2 : Eula Version minor |
| 168 | * 3 : AcConfig size << 14 | 2 | 172 | * 3 : ACConfig size << 14 | 2 |
| 169 | * 4 : Input pointer to AcConfig struct | 173 | * 4 : Input pointer to ACConfig struct |
| 170 | * 64 : AcConfig size << 14 | 2 | 174 | * 64 : ACConfig size << 14 | 2 |
| 171 | * 65 : Output pointer to AcConfig struct | 175 | * 65 : Output pointer to ACConfig struct |
| 172 | * Outputs: | 176 | * Outputs: |
| 173 | * 1 : Result of function, 0 on success, otherwise error code | 177 | * 1 : Result of function, 0 on success, otherwise error code |
| 174 | * 2 : Infra Priority | 178 | * 2 : Infra Priority |
| @@ -176,18 +180,18 @@ static void GetInfraPriority(Service::Interface* self) { | |||
| 176 | static void SetRequestEulaVersion(Service::Interface* self) { | 180 | static void SetRequestEulaVersion(Service::Interface* self) { |
| 177 | u32* cmd_buff = Kernel::GetCommandBuffer(); | 181 | u32* cmd_buff = Kernel::GetCommandBuffer(); |
| 178 | 182 | ||
| 179 | u8 major = cmd_buff[1] & 0xFF; | 183 | u32 major = cmd_buff[1] & 0xFF; |
| 180 | u8 minor = cmd_buff[2] & 0xFF; | 184 | u32 minor = cmd_buff[2] & 0xFF; |
| 181 | 185 | ||
| 182 | ASSERT_MSG(cmd_buff[3] == (sizeof(AcConfig) << 14 | 2), | 186 | ASSERT_MSG(cmd_buff[3] == (sizeof(ACConfig) << 14 | 2), |
| 183 | "Input buffer size not equal AcConfig size"); | 187 | "Input buffer size not equal ACConfig size"); |
| 184 | ASSERT_MSG(cmd_buff[64] == (sizeof(AcConfig) << 14 | 2), | 188 | ASSERT_MSG(cmd_buff[64] == (sizeof(ACConfig) << 14 | 2), |
| 185 | "Output buffer size not equal AcConfig size"); | 189 | "Output buffer size not equal ACConfig size"); |
| 186 | 190 | ||
| 187 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | 191 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error |
| 188 | cmd_buff[2] = 0; // Infra Priority | 192 | cmd_buff[2] = 0; // Infra Priority |
| 189 | 193 | ||
| 190 | LOG_WARNING(Service_AC, "(STUBBED) called, major=%d, minor=%d", major, minor); | 194 | LOG_WARNING(Service_AC, "(STUBBED) called, major=%u, minor=%u", major, minor); |
| 191 | } | 195 | } |
| 192 | 196 | ||
| 193 | /** | 197 | /** |