Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow NaN in cellVideoOutSetGamma #6997

Merged
merged 1 commit into from
Nov 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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