diff --git a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp index a74b9a5a68..14ac209a62 100644 --- a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp @@ -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(); conf->gamma = gamma;