Skip to content

Commit

Permalink
Disallow NaN in cellVideoOutSetGamma
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 authored and kd-11 committed Nov 16, 2019
1 parent 610463a commit 0f2adab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,14 @@ s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
{
cellAvconfExt.warning("cellVideoOutSetGamma(videoOut=%d, gamma=%f)", videoOut, gamma);

if (videoOut != CELL_VIDEO_OUT_PRIMARY)
if (!(gamma >= 0.8f && gamma <= 1.2f))
{
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
}

if (gamma < 0.8f || gamma > 1.2f)
if (videoOut != CELL_VIDEO_OUT_PRIMARY)
{
return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER;
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
}

auto conf = g_fxo->get<rsx::avconf>();
Expand Down

0 comments on commit 0f2adab

Please sign in to comment.