From 0ca3f8b7b611189869860c4a8e2aabdf1e622d22 Mon Sep 17 00:00:00 2001 From: mailwl Date: Sat, 20 Aug 2016 10:28:56 +0300 Subject: [PATCH] fixes --- src/core/hle/service/ac_u.cpp | 5 +++-- src/core/hle/service/frd/frd.cpp | 6 ++++-- src/core/hle/service/fs/fs_user.cpp | 10 ++++------ src/core/hle/service/mic_u.cpp | 5 +++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cpp index bc2589232..0d54533a5 100644 --- a/src/core/hle/service/ac_u.cpp +++ b/src/core/hle/service/ac_u.cpp @@ -77,9 +77,10 @@ static void IsConnected(Service::Interface* self) { static void SetClientVersion(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); - self->SetVersion(cmd_buff[1]); + const u32 version = cmd_buff[1]; + self->SetVersion(version); - LOG_WARNING(Service_AC, "(STUBBED) called, version: 0x%08X", cmd_buff[1]); + LOG_WARNING(Service_AC, "(STUBBED) called, version: 0x%08X", version); cmd_buff[1] = RESULT_SUCCESS.raw; // No error } diff --git a/src/core/hle/service/frd/frd.cpp b/src/core/hle/service/frd/frd.cpp index d4718080f..4e4917bcb 100644 --- a/src/core/hle/service/frd/frd.cpp +++ b/src/core/hle/service/frd/frd.cpp @@ -104,9 +104,11 @@ void GetMyScreenName(Service::Interface* self) { void SetClientSdkVersion(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); - self->SetVersion(cmd_buff[1]); + const u32 version = cmd_buff[1]; - LOG_WARNING(Service_FRD, "(STUBBED) called, version: 0x%08X", cmd_buff[1]); + self->SetVersion(version); + + LOG_WARNING(Service_FRD, "(STUBBED) called, version: 0x%08X", version); cmd_buff[1] = RESULT_SUCCESS.raw; // No error } diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp index 3ed16fe8d..59e899887 100644 --- a/src/core/hle/service/fs/fs_user.cpp +++ b/src/core/hle/service/fs/fs_user.cpp @@ -713,16 +713,14 @@ static void CreateLegacySystemSaveData(Service::Interface* self) { static void InitializeWithSdkVersion(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); - self->SetVersion(cmd_buff[1]); + const u32 version = cmd_buff[1]; + self->SetVersion(version); if (cmd_buff[2] == IPC::CallingPidDesc()) { - LOG_WARNING(Service_FS, "(STUBBED) called, version: 0x%08X", cmd_buff[1]); - + LOG_WARNING(Service_FS, "(STUBBED) called, version: 0x%08X", version); cmd_buff[1] = RESULT_SUCCESS.raw; - } - else { + } else { LOG_ERROR(Service_FS, "ProcessId Header must be 0x20"); - cmd_buff[1] = ResultCode(ErrorDescription::OS_InvalidBufferDescriptor, ErrorModule::OS, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; } diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cpp index 545c2360d..4a03775c2 100644 --- a/src/core/hle/service/mic_u.cpp +++ b/src/core/hle/service/mic_u.cpp @@ -21,9 +21,10 @@ namespace MIC_U { static void SetClientVersion(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); - self->SetVersion(cmd_buff[1]); + const u32 version = cmd_buff[1]; + self->SetVersion(version); - LOG_WARNING(Service_MIC, "(STUBBED) called, version: 0x%08X", cmd_buff[1]); + LOG_WARNING(Service_MIC, "(STUBBED) called, version: 0x%08X", version); cmd_buff[1] = RESULT_SUCCESS.raw; // No error }