Commit c7ff0fca authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

Fix inline usage with msvc

parent 954ed805
......@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <time.h>
#include <retro_inline.h>
/* The number of elements in a table */
#define RSDL_TABLESIZE(table) (sizeof(table)/sizeof(table[0]))
......@@ -68,11 +69,11 @@ typedef struct RSDL_Surface {
} RSDL_Surface;
static __inline__ unsigned short RSDL_Swap16(unsigned short x){
static INLINE unsigned short RSDL_Swap16(unsigned short x){
unsigned short result= ((x<<8)|(x>>8));
return result;
}
static __inline__ unsigned RSDL_Swap32(unsigned x){
static INLINE unsigned RSDL_Swap32(unsigned x){
unsigned result= ((x<<24)|((x<<8)&0x00FF0000)|((x>>8)&0x0000FF00)|(x>>24));
return result;
}
......
......@@ -2,6 +2,7 @@
#include "RSDL_wrapper.h"
#include <stdio.h>
#include <string.h>
#include <retro_inline.h>
static const char *cross[] = {
"X ",
......@@ -79,7 +80,7 @@ unsigned int Retro_MapRGBA(RSDL_PixelFormat *a, int r, int g, int b,int alpha){
| ((alpha >> a->Aloss) << a->Ashift & a->Amask);
}
static __inline__
static INLINE
RSDL_bool RSDL_IntersectRect(const RSDL_Rect *A, const RSDL_Rect *B, RSDL_Rect *intersection)
{
int Amin, Amax, Bmin, Bmax;
......
......@@ -9,8 +9,15 @@
*/
/* adapt to current compiler/host processor */
#include <retro_inline.h>
#ifdef _MSC_VER
#define MayInline INLINE
#define MayNotInline
#else
#define MayInline inline __attribute__((always_inline))
#define MayNotInline __attribute__((noinline))
#endif
#define SmallGlobals 0
#define cIncludeUnused 0
#define UnusedParam(p) (void) p
......
......@@ -896,7 +896,7 @@ LOCALFUNC tMacErr ActvCodeFileSave(ui3p p)
/* --- video out --- */
inline unsigned short RGBA8888_to_RGB565 (unsigned rgb)
INLINE unsigned short RGBA8888_to_RGB565 (unsigned rgb)
{
rgb=rgb>>8;
......
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