No need for static.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user