mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
Disallow NaN in cellVideoOutSetGamma
This commit is contained in:
parent
610463a425
commit
0f2adab05f
1 changed files with 5 additions and 5 deletions
|
@ -212,16 +212,16 @@ s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
|
||||||
{
|
{
|
||||||
cellAvconfExt.warning("cellVideoOutSetGamma(videoOut=%d, gamma=%f)", videoOut, 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)
|
if (videoOut != CELL_VIDEO_OUT_PRIMARY)
|
||||||
{
|
{
|
||||||
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
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>();
|
auto conf = g_fxo->get<rsx::avconf>();
|
||||||
conf->gamma = gamma;
|
conf->gamma = gamma;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue