From 8adfde4443e357680a022b9cd2d001885dc00bb7 Mon Sep 17 00:00:00 2001 From: JamePeng Date: Thu, 11 Feb 2016 05:20:35 +0800 Subject: [PATCH] Restore last defined variate Signed-off-by: JamePeng --- src/core/hle/service/y2r_u.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp index 8f5b5b19a..fb9e82219 100644 --- a/src/core/hle/service/y2r_u.cpp +++ b/src/core/hle/service/y2r_u.cpp @@ -84,6 +84,7 @@ ResultCode ConversionConfiguration::SetStandardCoefficient(StandardCoefficient s static void SetInputFormat(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); + conversion.input_format = static_cast(cmd_buff[1]); LOG_DEBUG(Service_Y2R, "called input_format=%hhu", conversion.input_format); @@ -93,7 +94,8 @@ static void SetInputFormat(Service::Interface* self) { static void GetInputFormat(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); - LOG_DEBUG(Service_Y2R, "Get input_format=%hhu", conversion.input_format); + InputFormat input_format = conversion.input_format; + LOG_DEBUG(Service_Y2R, "Get input_format=%hhu", input_format); cmd_buff[1] = RESULT_SUCCESS.raw; cmd_buff[2] = static_cast(conversion.input_format); @@ -111,7 +113,8 @@ static void SetOutputFormat(Service::Interface* self) { static void GetOutputFormat(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); - LOG_DEBUG(Service_Y2R, "Get output_format=%hhu", conversion.output_format); + OutputFormat output_format = conversion.output_format; + LOG_DEBUG(Service_Y2R, "Get output_format=%hhu", output_format); cmd_buff[1] = RESULT_SUCCESS.raw; cmd_buff[2] = static_cast(conversion.output_format);