Disallow NaN in cellVideoOutSetGamma

This commit is contained in:
Eladash 2019-11-15 21:56:26 +02:00 committed by kd-11
parent 610463a425
commit 0f2adab05f
1 changed files with 5 additions and 5 deletions

View File

@ -212,16 +212,16 @@ s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
{
cellAvconfExt.warning("cellVideoOutSetGamma(videoOut=%d, gamma=%f)", videoOut, gamma);
if (!(gamma >= 0.8f && gamma <= 1.2f))
{
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
}
if (videoOut != CELL_VIDEO_OUT_PRIMARY)
{
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
}
if (gamma < 0.8f || gamma > 1.2f)
{
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
}
auto conf = g_fxo->get<rsx::avconf>();
conf->gamma = gamma;