No need for static.

This commit is contained in:
Steve Checkoway
2006-09-15 22:11:08 +00:00
parent 7ca6b10016
commit e262e7902a
2 changed files with 5 additions and 10 deletions
+2 -8
View File
@@ -5,7 +5,6 @@
bool ArchHooks::g_bQuitting = false;
bool ArchHooks::g_bToggleWindowed = false;
bool ArchHooks::g_bHasFocus = true;
// Keep from pulling RageThreads.h into ArchHooks.h
static RageMutex g_Mutex( "ArchHooks" );
ArchHooks *HOOKS = NULL;
@@ -33,18 +32,13 @@ ArchHooks *MakeArchHooks()
void ArchHooks::SetHasFocus( bool bHasFocus )
{
if( bHasFocus == g_bHasFocus )
if( bHasFocus == m_bHasFocus )
return;
g_bHasFocus = bHasFocus;
m_bHasFocus = bHasFocus;
LOG->Trace( "App %s focus", bHasFocus? "has":"doesn't have" );
}
bool ArchHooks::AppHasFocus()
{
return g_bHasFocus;
}
bool ArchHooks::GoToURL( RString sUrl )
{
return false;
+3 -2
View File
@@ -4,6 +4,7 @@
class ArchHooks
{
public:
ArchHooks(): m_bHasFocus(true) { }
virtual ~ArchHooks() { }
virtual void Init() { }
/*
@@ -106,7 +107,7 @@ public:
/*
* Return true if the application has input focus.
*/
bool AppHasFocus();
bool AppHasFocus() const { return m_bHasFocus; }
/*
* Open a URL in the default web browser
@@ -121,7 +122,7 @@ private:
static bool g_bQuitting;
static bool g_bToggleWindowed;
static bool g_bHasFocus;
bool m_bHasFocus;
};
#endif