Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi

This commit is contained in:
Sam Lantinga 2013-09-30 22:35:32 -07:00
parent 76f3df86db
commit 414ff3106c
5 changed files with 23 additions and 19 deletions

View file

@ -33,7 +33,9 @@
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
#include <AvailabilityMacros.h>
static inline void Cocoa_ToggleMenuBar(const BOOL show)
static void
Cocoa_ToggleMenuBar(const BOOL show)
{
/* !!! FIXME: keep an eye on this.
* ShowMenuBar/HideMenuBar is officially unavailable for 64-bit binaries.
@ -57,7 +59,7 @@ static inline void Cocoa_ToggleMenuBar(const BOOL show)
#define MAC_OS_X_VERSION_MIN_REQUIRED 1050
#endif
static inline BOOL
static BOOL
IS_SNOW_LEOPARD_OR_LATER(_THIS)
{
#if FORCE_OLD_API
@ -179,7 +181,7 @@ GetDisplayMode(_THIS, const void *moderef, SDL_DisplayMode *mode)
return SDL_TRUE;
}
static inline void
static void
Cocoa_ReleaseDisplayMode(_THIS, const void *moderef)
{
if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
@ -187,7 +189,7 @@ Cocoa_ReleaseDisplayMode(_THIS, const void *moderef)
}
}
static inline void
static void
Cocoa_ReleaseDisplayModeList(_THIS, CFArrayRef modelist)
{
if (IS_SNOW_LEOPARD_OR_LATER(_this)) {

View file

@ -82,8 +82,8 @@ Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShape
data->saved = SDL_FALSE;
}
//[data->context saveGraphicsState];
//data->saved = SDL_TRUE;
/*[data->context saveGraphicsState];*/
/*data->saved = SDL_TRUE;*/
[NSGraphicsContext setCurrentContext:data->context];
[[NSColor clearColor] set];

View file

@ -44,7 +44,7 @@
static Uint32 s_moveHack;
static __inline__ void ConvertNSRect(NSRect *r)
static void ConvertNSRect(NSRect *r)
{
r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height;
}
@ -920,8 +920,9 @@ Cocoa_RaiseWindow(_THIS, SDL_Window * window)
SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata);
NSWindow *nswindow = windowData->nswindow;
// makeKeyAndOrderFront: has the side-effect of deminiaturizing and showing
// a minimized or hidden window, so check for that before showing it.
/* makeKeyAndOrderFront: has the side-effect of deminiaturizing and showing
a minimized or hidden window, so check for that before showing it.
*/
[windowData->listener pauseVisibleObservation];
if (![nswindow isMiniaturized] && [nswindow isVisible]) {
[nswindow makeKeyAndOrderFront:nil];