diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp index bbead9344..2183282ec 100644 --- a/src/core/hle/service/y2r_u.cpp +++ b/src/core/hle/service/y2r_u.cpp @@ -84,13 +84,22 @@ 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); cmd_buff[1] = RESULT_SUCCESS.raw; } +static void GetInputFormat(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + InputFormat inf = conversion.input_format; + LOG_DEBUG(Service_Y2R, "Get input_format=%hhu", inf); + + cmd_buff[1] = RESULT_SUCCESS.raw; + cmd_buff[2] = static_cast(inf); +} + static void SetOutputFormat(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); @@ -100,6 +109,16 @@ static void SetOutputFormat(Service::Interface* self) { cmd_buff[1] = RESULT_SUCCESS.raw; } +static void GetOutputFormat(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + OutputFormat opf = conversion.output_format; + LOG_DEBUG(Service_Y2R, "Get output_format=%hhu", opf); + + cmd_buff[1] = RESULT_SUCCESS.raw; + cmd_buff[2] = static_cast(opf); +} + static void SetRotation(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); @@ -375,9 +394,9 @@ static void DriverFinalize(Service::Interface* self) { const Interface::FunctionInfo FunctionTable[] = { {0x00010040, SetInputFormat, "SetInputFormat"}, - {0x00020000, nullptr, "GetInputFormat"}, + {0x00020000, GetInputFormat, "GetInputFormat"}, {0x00030040, SetOutputFormat, "SetOutputFormat"}, - {0x00040000, nullptr, "GetOutputFormat"}, + {0x00040000, SetOutputFormat, "GetOutputFormat"}, {0x00050040, SetRotation, "SetRotation"}, {0x00060000, nullptr, "GetRotation"}, {0x00070040, SetBlockAlignment, "SetBlockAlignment"},