diff --git a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp index effc3e9ab0..c8611b79a1 100644 --- a/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAvconfExt.cpp @@ -201,6 +201,11 @@ error_code cellVideoOutGetGamma(u32 videoOut, vm::ptr gamma) { cellAvconfExt.warning("cellVideoOutGetGamma(videoOut=%d, gamma=*0x%x)", videoOut, gamma); + if (!gamma) + { + return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER; + } + if (videoOut != CELL_VIDEO_OUT_PRIMARY) { return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT; @@ -301,6 +306,11 @@ error_code cellVideoOutGetScreenSize(u32 videoOut, vm::ptr screenSize) { cellAvconfExt.warning("cellVideoOutGetScreenSize(videoOut=%d, screenSize=*0x%x)", videoOut, screenSize); + if (!screenSize) + { + return CELL_VIDEO_OUT_ERROR_ILLEGAL_PARAMETER; + } + if (videoOut != CELL_VIDEO_OUT_PRIMARY) { return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT; diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index 57cde809e8..7eb1120aa0 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -626,7 +626,7 @@ void gs_frame::take_screenshot(std::vector data, const u32 sshot_width, cons const auto& avconf = g_fxo->get(); auto new_size = avconf.aspect_convert_dimensions(size2u{ u32(img.width()), u32(img.height()) }); - if (new_size.width != img.width() || new_size.height != img.height()) + if (new_size.width != static_cast(img.width()) || new_size.height != static_cast(img.height())) { img = img.scaled(QSize(new_size.width, new_size.height), Qt::AspectRatioMode::IgnoreAspectRatio, Qt::TransformationMode::SmoothTransformation); img.convertTo(QImage::Format_RGBA8888); // The current Qt version changes the image format during smooth scaling, so we have to change it back. @@ -679,7 +679,7 @@ void gs_frame::take_screenshot(std::vector data, const u32 sshot_width, cons // Scale the resolution first (as seen before with the image) new_size = avconf.aspect_convert_dimensions(size2u{ avconf.resolution_x, avconf.resolution_y }); - if (new_size.width != img.width() || new_size.height != img.height()) + if (new_size.width != static_cast(img.width()) || new_size.height != static_cast(img.height())) { const int scale = rsx::get_resolution_scale_percent(); const int x = (scale * manager.overlay_offset_x) / 100;