Commit 8c6ec56b authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Fix MSB_FIRST codepath

parent c5d5e706
......@@ -122,9 +122,17 @@ static INLINE short LittleShort(short s) { return bswap16(s); }
static INLINE int LittleLong(int l) { return bswap32(l); }
static INLINE float LittleFloat(float f)
{
union { float f; int l; } u = { .f = f };
u.l = bswap32(u.l);
return u.f;
union {
float f;
byte b[4];
} dat1, dat2;
dat1.f = f;
dat2.b[0] = dat1.b[3];
dat2.b[1] = dat1.b[2];
dat2.b[2] = dat1.b[1];
dat2.b[3] = dat1.b[0];
return dat2.f;
}
#else
static INLINE short BigShort(short s) { return bswap16(s); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment