diff options
| author | 2018-07-20 09:17:07 -0700 | |
|---|---|---|
| committer | 2018-07-20 09:17:07 -0700 | |
| commit | 701c7cb85ce48f627f422f593843fa692f785236 (patch) | |
| tree | 65030bd5eaa71479c8db3f23c87496a020e16d75 | |
| parent | Merge pull request #735 from lioncash/video-unused (diff) | |
| parent | audren_u: Use a std::array instead of std::string for holding the audio inter... (diff) | |
| download | yuzu-701c7cb85ce48f627f422f593843fa692f785236.tar.gz yuzu-701c7cb85ce48f627f422f593843fa692f785236.tar.xz yuzu-701c7cb85ce48f627f422f593843fa692f785236.zip | |
Merge pull request #736 from lioncash/null
audout_u/audren_u: Ensure null terminators are written out in ListAudioOutsImpl(), ListAudioDeviceName(), and GetActiveAudioDeviceName()
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 4217ea4fb..154bc12da 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <array> | ||
| 5 | #include <vector> | 6 | #include <vector> |
| 6 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 7 | #include "core/core_timing.h" | 8 | #include "core/core_timing.h" |
| @@ -167,7 +168,7 @@ void AudOutU::ListAudioOutsImpl(Kernel::HLERequestContext& ctx) { | |||
| 167 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 168 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 168 | IPC::RequestParser rp{ctx}; | 169 | IPC::RequestParser rp{ctx}; |
| 169 | 170 | ||
| 170 | const std::string audio_interface = "AudioInterface"; | 171 | constexpr std::array<char, 15> audio_interface{{"AudioInterface"}}; |
| 171 | ctx.WriteBuffer(audio_interface); | 172 | ctx.WriteBuffer(audio_interface); |
| 172 | 173 | ||
| 173 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); | 174 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); |
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 6903f52d6..e623f4f8e 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <array> | ||
| 6 | |||
| 5 | #include "common/alignment.h" | 7 | #include "common/alignment.h" |
| 6 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 7 | #include "core/core_timing.h" | 9 | #include "core/core_timing.h" |
| @@ -298,7 +300,7 @@ private: | |||
| 298 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 300 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 299 | IPC::RequestParser rp{ctx}; | 301 | IPC::RequestParser rp{ctx}; |
| 300 | 302 | ||
| 301 | const std::string audio_interface = "AudioInterface"; | 303 | constexpr std::array<char, 15> audio_interface{{"AudioInterface"}}; |
| 302 | ctx.WriteBuffer(audio_interface); | 304 | ctx.WriteBuffer(audio_interface); |
| 303 | 305 | ||
| 304 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); | 306 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); |
| @@ -323,7 +325,7 @@ private: | |||
| 323 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 325 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 324 | IPC::RequestParser rp{ctx}; | 326 | IPC::RequestParser rp{ctx}; |
| 325 | 327 | ||
| 326 | const std::string audio_interface = "AudioDevice"; | 328 | constexpr std::array<char, 12> audio_interface{{"AudioDevice"}}; |
| 327 | ctx.WriteBuffer(audio_interface); | 329 | ctx.WriteBuffer(audio_interface); |
| 328 | 330 | ||
| 329 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); | 331 | IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0); |