mirror of https://github.com/RPCS3/rpcs3.git
Disallow NaN in cellVideoOutSetGamma
This commit is contained in:
parent
610463a425
commit
0f2adab05f
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue