Skip to content

Commit

Permalink
Get rid of a few GSdx warnings. Remove some extra newlines in Sio's c…
Browse files Browse the repository at this point in the history
…onsole output.
  • Loading branch information
arcum42 committed Oct 27, 2018
1 parent 0cbbf2d commit 6710b0c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pcsx2/Sio.cpp
Expand Up @@ -171,7 +171,7 @@ SIO_WRITE sioWriteStart(u8 data)
case 0x81: siomode = SIO_MEMCARD; break;

default:
DevCon.Warning("%s cmd: %02X??\n", __FUNCTION__, data);
DevCon.Warning("%s cmd: %02X??", __FUNCTION__, data);
DEVICE_UNPLUGGED();
siomode = SIO_DUMMY;
break;
Expand Down Expand Up @@ -257,7 +257,7 @@ SIO_WRITE sioWriteMultitap(u8 data)
break;

default:
DevCon.Warning("%s cmd: %02X??\n", __FUNCTION__, data);
DevCon.Warning("%s cmd: %02X??", __FUNCTION__, data);
sio.buf[3] = 0x00;
sio.buf[4] = 0x00;
sio.buf[5] = 0x00;
Expand Down Expand Up @@ -364,7 +364,7 @@ SIO_WRITE memcardErase(u8 data)
break;

default:
DevCon.Warning("%s cmd: %02X??\n", __FUNCTION__, data);
DevCon.Warning("%s cmd: %02X??", __FUNCTION__, data);
sio.bufCount = -1;
//sio.bufSize = 3;
//sio.bufCount = 4;
Expand Down Expand Up @@ -425,7 +425,7 @@ SIO_WRITE memcardWrite(u8 data)
}

default:
DevCon.Warning("%s cmd: %02X??\n", __FUNCTION__, data);
DevCon.Warning("%s cmd: %02X??", __FUNCTION__, data);
sio.bufCount = -1;
//sio.bufSize = 3;
//sio.bufCount = 4;
Expand Down Expand Up @@ -515,7 +515,7 @@ SIO_WRITE memcardRead(u8 data)
}

default:
DevCon.Warning("%s cmd: %02X??\n", __FUNCTION__, data);
DevCon.Warning("%s cmd: %02X??", __FUNCTION__, data);
sio.bufCount = -1;
//sio.bufSize = 3;
//sio.bufCount = 4;
Expand Down Expand Up @@ -706,7 +706,7 @@ SIO_WRITE sioWriteMemcard(u8 data)
break;

default:
DevCon.Warning("%s cmd: %02X??\n", __FUNCTION__, data);
DevCon.Warning("%s cmd: %02X??", __FUNCTION__, data);
siomode = SIO_DUMMY;
break;
}
Expand Down
6 changes: 6 additions & 0 deletions plugins/GSdx/GSRendererOGL.cpp
Expand Up @@ -562,17 +562,23 @@ void GSRendererOGL::EmulateBlending(bool DATE_GL42)
bool accumulation_blend = !!(blend_flag & BLEND_ACCU);

// Warning no break on purpose
// Note: the "fall through" comments tell gcc not to complain about not having breaks.
switch (m_sw_blending) {
case ACC_BLEND_ULTRA: sw_blending |= true;
// fall through
case ACC_BLEND_FULL: if (!m_vt.m_alpha.valid && (ALPHA.C == 0)) GetAlphaMinMax();
sw_blending |= (ALPHA.A != ALPHA.B) &&
((ALPHA.C == 0 && m_vt.m_alpha.max > 128) || (ALPHA.C == 2 && ALPHA.FIX > 128u));
// fall through
case ACC_BLEND_CCLIP_DALPHA: sw_blending |= (ALPHA.C == 1) || (m_env.COLCLAMP.CLAMP == 0);
// Initial idea was to enable accurate blending for sprite rendering to handle
// correctly post-processing effect. Some games (ZoE) use tons of sprites as particles.
// In order to keep it fast, let's limit it to smaller draw call.
// fall through
case ACC_BLEND_SPRITE: sw_blending |= m_vt.m_primclass == GS_SPRITE_CLASS && m_drawlist.size() < 100;
// fall through
case ACC_BLEND_FREE: sw_blending |= impossible_or_free_blend;
// fall through
default: /*sw_blending |= accumulation_blend*/;
}
// SW Blending
Expand Down
1 change: 1 addition & 0 deletions plugins/GSdx/GSTextureOGL.cpp
Expand Up @@ -252,6 +252,7 @@ GSTextureOGL::GSTextureOGL(int type, int w, int h, int format, GLuint fbo_read,
case GSTexture::Offscreen:
// Offscreen is only used to read color. So it only requires 4B by pixel
m_local_buffer = (uint8*)_aligned_malloc(m_size.x * m_size.y * 4, 32);
// fall through
case GSTexture::Texture:
case GSTexture::RenderTarget:
case GSTexture::DepthStencil:
Expand Down
4 changes: 4 additions & 0 deletions plugins/GSdx/GSVector4i.h
Expand Up @@ -47,6 +47,10 @@ class alignas(16) GSVector4i

__forceinline GSVector4i()
{
x = 0;
y = 0;
z = 0;
w = 0;
}

__forceinline GSVector4i(int x, int y, int z, int w)
Expand Down

1 comment on commit 6710b0c

@lightningterror
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps breaks can be added after ACC_BLEND_FREE and default ?

Please sign in to comment.