gsdx:atomic: better match the old if(!_interlockedbittestandset(&m_mapped, 0)) behavior

Thanks @turtleli
This commit is contained in:
Gregory Hainaut 2016-02-23 18:43:44 +01:00
parent c0e58e48ae
commit cb776d2f50
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ bool GSTextureSW::Map(GSMap& m, const GSVector4i* r)
if(m_data != NULL && r2.left >= 0 && r2.right <= m_size.x && r2.top >= 0 && r2.bottom <= m_size.y)
{
while(m_mapped.test_and_set()) {}
if (!m_mapped.test_and_set())
{
m.bits = (uint8*)m_data + ((m_pitch * r2.top + r2.left) << 2);
m.pitch = m_pitch;