Commit c5d5e706 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

(MSVC 2010) Buildfix

parent eb3aacca
......@@ -131,9 +131,17 @@ static INLINE short BigShort(short s) { return bswap16(s); }
static INLINE int BigLong(int l) { return bswap32(l); }
static INLINE float BigFloat(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;
}
static INLINE short LittleShort(short s) { return s; }
static INLINE int LittleLong(int l) { return l; }
......
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