diff --git a/plugins/zzogl-pg/opengl/GS.h b/plugins/zzogl-pg/opengl/GS.h index 75a7a82aa6..82aaade478 100644 --- a/plugins/zzogl-pg/opengl/GS.h +++ b/plugins/zzogl-pg/opengl/GS.h @@ -542,7 +542,9 @@ typedef struct extern GSinternal gs; -static __forceinline u16 RGBA32to16(u32 c) +// Note the function is used in a template parameter so it must be declared extern +// Note2: In this case extern is not compatible with __forceinline so just inline it... +extern inline u16 RGBA32to16(u32 c) { return (u16)((((c) & 0x000000f8) >> 3) | (((c) & 0x0000f800) >> 6) | diff --git a/plugins/zzogl-pg/opengl/targets.cpp b/plugins/zzogl-pg/opengl/targets.cpp index 6e24732a7a..7126ab619d 100644 --- a/plugins/zzogl-pg/opengl/targets.cpp +++ b/plugins/zzogl-pg/opengl/targets.cpp @@ -2928,14 +2928,6 @@ void FlushTransferRanges(const tex0Info* ptex) template inline Tret dummy_return(T value) { return value; } -inline u16 RGBA32to16(u32 c) -{ - return (u16)((((c) & 0x000000f8) >> 3) | - (((c) & 0x0000f800) >> 6) | - (((c) & 0x00f80000) >> 9) | - (((c) & 0x80000000) >> 16)); -} - template inline void Resolve_32_Bit(const void* psrc, int fbp, int fbw, int fbh, const int psm, u32 fbm) {