From a51455656ae74c65eddebee4ffebe1f7acc3862c Mon Sep 17 00:00:00 2001 From: "gregory.hainaut@gmail.com" Date: Wed, 15 Sep 2010 21:26:59 +0000 Subject: [PATCH] GregMiscellaneous: zzogl-pg: * Properly fix the 'missing external linkage' thanks to Gigaherz. git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3773 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/zzogl-pg/opengl/GS.h | 4 +++- plugins/zzogl-pg/opengl/targets.cpp | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-) 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) {