use HOOKS->SetHasFocus
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
#include "SDL_utils.h"
|
#include "SDL_utils.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageDisplay.h" // for REFRESH_DEFAULT
|
#include "RageDisplay.h" // for REFRESH_DEFAULT
|
||||||
#include "StepMania.h"
|
|
||||||
#include "arch/ArchHooks/ArchHooks.h"
|
#include "arch/ArchHooks/ArchHooks.h"
|
||||||
#include "DisplayResolutions.h"
|
#include "DisplayResolutions.h"
|
||||||
|
|
||||||
@@ -215,7 +214,7 @@ void LowLevelWindow_SDL::Update()
|
|||||||
{
|
{
|
||||||
uint8_t i = SDL_GetAppState();
|
uint8_t i = SDL_GetAppState();
|
||||||
LOG->Trace( "SDL_GetAppState: %i", i );
|
LOG->Trace( "SDL_GetAppState: %i", i );
|
||||||
StepMania::FocusChanged( i&SDL_APPINPUTFOCUS && i&SDL_APPACTIVE );
|
HOOKS->SetHasFocus( i&SDL_APPINPUTFOCUS && i&SDL_APPACTIVE );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "RageDisplay.h"
|
#include "RageDisplay.h"
|
||||||
#include "DisplayResolutions.h"
|
#include "DisplayResolutions.h"
|
||||||
#include "arch/ArchHooks/ArchHooks_Win32.h"
|
#include "arch/ArchHooks/ArchHooks.h"
|
||||||
#include "archutils/Win32/AppInstance.h"
|
#include "archutils/Win32/AppInstance.h"
|
||||||
#include "archutils/Win32/WindowIcon.h"
|
#include "archutils/Win32/WindowIcon.h"
|
||||||
#include "archutils/Win32/GetFileInformation.h"
|
#include "archutils/Win32/GetFileInformation.h"
|
||||||
@@ -60,9 +60,8 @@ LRESULT CALLBACK GraphicsWindow::GraphicsWindow_WndProc( HWND hWnd, UINT msg, WP
|
|||||||
const bool bInactive = (LOWORD(wParam) == WA_INACTIVE);
|
const bool bInactive = (LOWORD(wParam) == WA_INACTIVE);
|
||||||
const bool bMinimized = (HIWORD(wParam) != 0);
|
const bool bMinimized = (HIWORD(wParam) != 0);
|
||||||
const bool bHadFocus = g_bHasFocus;
|
const bool bHadFocus = g_bHasFocus;
|
||||||
LOG->Trace("WM_ACTIVATE (%i, %i)",
|
|
||||||
bInactive, bMinimized );
|
|
||||||
g_bHasFocus = !bInactive && !bMinimized;
|
g_bHasFocus = !bInactive && !bMinimized;
|
||||||
|
LOG->Trace( "WM_ACTIVATE (%i, %i): %s", bInactive, bMinimized, g_bHasFocus? "has focus":"doesn't have focus" );
|
||||||
if( !g_bHasFocus )
|
if( !g_bHasFocus )
|
||||||
{
|
{
|
||||||
CString sName = GetNewWindow();
|
CString sName = GetNewWindow();
|
||||||
@@ -457,7 +456,7 @@ void GraphicsWindow::Update()
|
|||||||
DispatchMessage( &msg );
|
DispatchMessage( &msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
StepMania::FocusChanged( g_bHasFocus );
|
HOOKS->SetHasFocus( g_bHasFocus );
|
||||||
|
|
||||||
if( g_bResolutionChanged && DISPLAY != NULL )
|
if( g_bResolutionChanged && DISPLAY != NULL )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user