mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12:00
Rewrite cellVideoOutConfigure
This commit is contained in:
parent
650db9c962
commit
590ca7115f
1 changed files with 14 additions and 16 deletions
|
@ -128,28 +128,26 @@ error_code cellVideoOutGetResolution(u32 resolutionId, vm::ptr<CellVideoOutResol
|
||||||
|
|
||||||
error_code cellVideoOutConfigure(u32 videoOut, vm::ptr<CellVideoOutConfiguration> config, vm::ptr<CellVideoOutOption> option, u32 waitForEvent)
|
error_code cellVideoOutConfigure(u32 videoOut, vm::ptr<CellVideoOutConfiguration> config, vm::ptr<CellVideoOutOption> option, u32 waitForEvent)
|
||||||
{
|
{
|
||||||
cellSysutil.warning("cellVideoOutConfigure(videoOut=%d, config=*0x%x, option=*0x%x, waitForEvent=%d)", videoOut, config, option, waitForEvent);
|
cellSysutil.todo("cellVideoOutConfigure(videoOut=%d, config=*0x%x, option=*0x%x, waitForEvent=%d)", videoOut, config, option, waitForEvent);
|
||||||
|
|
||||||
switch (videoOut)
|
if (!config)
|
||||||
{
|
{
|
||||||
case CELL_VIDEO_OUT_PRIMARY:
|
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
|
||||||
if (config->resolutionId != g_video_out_resolution_id.at(g_cfg.video.resolution)
|
}
|
||||||
|| (config->format != CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8R8G8B8 &&
|
|
||||||
config->format != CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8B8G8R8 &&
|
if (!config->pitch)
|
||||||
config->format != CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_R16G16B16X16_FLOAT)
|
{
|
||||||
|| (config->aspect != CELL_VIDEO_OUT_ASPECT_AUTO && config->aspect != g_video_out_aspect_id.at(g_cfg.video.aspect_ratio)))
|
return CELL_VIDEO_OUT_ERROR_PARAMETER_OUT_OF_RANGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config->resolutionId == 0x92 || config->resolutionId == 0xa1)
|
||||||
{
|
{
|
||||||
return CELL_VIDEO_OUT_ERROR_ILLEGAL_CONFIGURATION;
|
return CELL_VIDEO_OUT_ERROR_ILLEGAL_CONFIGURATION;
|
||||||
}
|
}
|
||||||
return CELL_OK;
|
|
||||||
|
|
||||||
case CELL_VIDEO_OUT_SECONDARY:
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_code cellVideoOutGetConfiguration(u32 videoOut, vm::ptr<CellVideoOutConfiguration> config, vm::ptr<CellVideoOutOption> option)
|
error_code cellVideoOutGetConfiguration(u32 videoOut, vm::ptr<CellVideoOutConfiguration> config, vm::ptr<CellVideoOutOption> option)
|
||||||
{
|
{
|
||||||
cellSysutil.warning("cellVideoOutGetConfiguration(videoOut=%d, config=*0x%x, option=*0x%x)", videoOut, config, option);
|
cellSysutil.warning("cellVideoOutGetConfiguration(videoOut=%d, config=*0x%x, option=*0x%x)", videoOut, config, option);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue