From a9b8a20aa5ca7c43da499d12429144773113bd11 Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Wed, 29 Apr 2009 19:07:22 +0000 Subject: [PATCH] Make focusState a static to main.c, instead of a global from frame.c git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7240 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/framework/frame.c | 2 -- lib/framework/frame.h | 6 ------ src/main.c | 7 ++++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/framework/frame.c b/lib/framework/frame.c index f9ab26bfd..d2014fbca 100644 --- a/lib/framework/frame.c +++ b/lib/framework/frame.c @@ -51,8 +51,6 @@ static const enum CURSOR_TYPE cursor_type = static CURSOR currentCursor = ~(CURSOR)0; static SDL_Cursor* aCursors[CURSOR_MAX]; -FOCUS_STATE focusState = FOCUS_IN; - bool selfTest = false; /************************************************************************************ diff --git a/lib/framework/frame.h b/lib/framework/frame.h index 7aa6107a8..5f9f52c32 100644 --- a/lib/framework/frame.h +++ b/lib/framework/frame.h @@ -69,12 +69,6 @@ extern bool selfTest; */ extern void frameShutDown(void); -typedef enum _focus_state -{ - FOCUS_OUT, // Window does not have the focus - FOCUS_IN, // Window has got the focus -} FOCUS_STATE; - /*! * Set the framerate limit * diff --git a/src/main.c b/src/main.c index c3d36f833..f9a913891 100644 --- a/src/main.c +++ b/src/main.c @@ -85,6 +85,11 @@ # define DATADIR "data" #endif +typedef enum _focus_state +{ + FOCUS_OUT, // Window does not have the focus + FOCUS_IN, // Window has got the focus +} FOCUS_STATE; #if defined(WZ_OS_WIN) # define WZ_WRITEDIR "Warzone 2100 2.2" @@ -119,7 +124,7 @@ char KeyMapPath[PATH_MAX]; static GS_GAMEMODE gameStatus = GS_TITLE_SCREEN; // Status of the gameloop static int gameLoopStatus = 0; -extern FOCUS_STATE focusState; +static FOCUS_STATE focusState = FOCUS_IN; extern void debug_callback_stderr( void**, const char * ); extern void debug_callback_win32debug( void**, const char * );