Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix build issue on Win/Haiku.
Browse files Browse the repository at this point in the history
       This fixes a build issue with C variable declarations in my refcounting
       change.
  • Loading branch information
jorgenpt committed Feb 12, 2013
1 parent bd3ee8f commit 056c2e1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/SDL.c
Expand Up @@ -48,15 +48,17 @@ static SDL_bool SDL_bInMainQuit = SDL_FALSE;
static Uint8 SDL_SubsystemRefCount[ 32 ];

/* Private helper to increment a subsystem's ref counter. */
static void SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem)
static void
SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem)
{
int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
SDL_assert(SDL_SubsystemRefCount[subsystem_index] < 255);
++SDL_SubsystemRefCount[subsystem_index];
}

/* Private helper to decrement a subsystem's ref counter. */
void SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
static void
SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
{
int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
if (SDL_SubsystemRefCount[subsystem_index] > 0) {
Expand All @@ -68,11 +70,12 @@ void SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
static SDL_bool
SDL_PrivateShouldInitSubsystem(Uint32 flags, Uint32 subsystem)
{
int subsystem_index;
if ((flags & subsystem) == 0) {
return SDL_FALSE;
}

int subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
subsystem_index = SDL_MostSignificantBitIndex32(subsystem);
SDL_assert(SDL_SubsystemRefCount[subsystem_index] < 255);
return (SDL_SubsystemRefCount[subsystem_index] == 0);
}
Expand Down

0 comments on commit 056c2e1

Please sign in to comment.