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:
parent
6283600b84
commit
0d7b7585a8
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user