summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFengChen <vonchenplus@gmail.com>2023-04-15 04:00:20 +0200
committerFengChen <vonchenplus@gmail.com>2023-04-16 06:31:54 +0200
commit55a33342cc65b9045463019bf5c93c3c0a1b9eaa (patch)
tree7a1ee9e4208f9a1e709e5210dd9f334cc816c8d8 /src/core
parentMerge pull request #10030 from Wollnashorn/botw-amd-fix (diff)
downloadyuzu-55a33342cc65b9045463019bf5c93c3c0a1b9eaa.tar
yuzu-55a33342cc65b9045463019bf5c93c3c0a1b9eaa.tar.gz
yuzu-55a33342cc65b9045463019bf5c93c3c0a1b9eaa.tar.bz2
yuzu-55a33342cc65b9045463019bf5c93c3c0a1b9eaa.tar.lz
yuzu-55a33342cc65b9045463019bf5c93c3c0a1b9eaa.tar.xz
yuzu-55a33342cc65b9045463019bf5c93c3c0a1b9eaa.tar.zst
yuzu-55a33342cc65b9045463019bf5c93c3c0a1b9eaa.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/audio/audout_u.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp
index 23b8be993..3e62fa4fc 100644
--- a/src/core/hle/service/audio/audout_u.cpp
+++ b/src/core/hle/service/audio/audout_u.cpp
@@ -49,12 +49,6 @@ public:
};
// clang-format on
RegisterHandlers(functions);
-
- if (impl->GetSystem()
- .Initialize(device_name, in_params, handle, applet_resource_user_id)
- .IsError()) {
- LOG_ERROR(Service_Audio, "Failed to initialize the AudioOut System!");
- }
}
~IAudioOut() override {
@@ -287,6 +281,14 @@ void AudOutU::OpenAudioOut(HLERequestContext& ctx) {
auto audio_out = std::make_shared<IAudioOut>(system, *impl, new_session_id, device_name,
in_params, handle, applet_resource_user_id);
+ result = audio_out->GetImpl()->GetSystem().Initialize(device_name, in_params, handle,
+ applet_resource_user_id);
+ if (result.IsError()) {
+ LOG_ERROR(Service_Audio, "Failed to initialize the AudioOut System!");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(result);
+ return;
+ }
impl->sessions[new_session_id] = audio_out->GetImpl();
impl->applet_resource_user_ids[new_session_id] = applet_resource_user_id;