1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Some typo/warning fixes

This commit is contained in:
Megamouse 2021-11-15 18:26:31 +01:00
parent 6283600b84
commit 0d7b7585a8
5 changed files with 11 additions and 10 deletions

View File

@ -49,7 +49,7 @@ struct av_get_monitor_info_cmd : public ps3av_cmd
evnt->color.red_x = 0xFFFF;
evnt->color.red_y = 0xFFFF;
evnt->color.white_x = 0xFFFF;
evnt->color.white_x = 0xFFFF;
evnt->color.white_y = 0xFFFF;
evnt->color.gamma = 100;
evnt->supported_ai = 0;

View File

@ -185,7 +185,7 @@ void pad_thread::Init()
void pad_thread::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor)
{
if (pad > m_pads.size())
if (pad >= m_pads.size())
return;
if (m_pads[pad]->m_vibrateMotors.size() >= 2)

View File

@ -72,11 +72,6 @@ bool emu_settings::Init()
{
m_render_creator = new render_creator(this);
if (!m_render_creator)
{
fmt::throw_exception("emu_settings::emu_settings() render_creator is null");
}
if (m_render_creator->abort_requested)
{
return false;

View File

@ -53,7 +53,7 @@ public:
{
if (path.isEmpty() || !m_icon_callback) return;
if (QMovie* movie = new QMovie(path); movie && movie->isValid())
if (QMovie* movie = new QMovie(path); movie->isValid())
{
m_movie = movie;
}

View File

@ -374,11 +374,17 @@ namespace
*/
u8* convert_to_QImage_buffer(rsx::surface_color_format format, std::span<const std::byte> orig_buffer, usz width, usz height) noexcept
{
u8* buffer = static_cast<u8*>(std::malloc(width * height * 4));
if (!buffer || width == 0 || height == 0)
if (width == 0 || height == 0)
{
return nullptr;
}
u8* buffer = static_cast<u8*>(std::malloc(width * height * 4));
if (!buffer)
{
return nullptr;
}
for (u32 i = 0; i < width * height; i++)
{
// depending on original buffer, the colors may need to be reversed