Skip to content

Commit

Permalink
Fixed setCursorPosition incongruities
Browse files Browse the repository at this point in the history
  • Loading branch information
ccw808 committed Jul 7, 2013
1 parent 423de38 commit cf4046e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions MTA10/core/CCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2252,3 +2252,12 @@ void CCore::UpdateDummyProgress( int iPercent )

CGraphics::GetSingleton().SetProgressMessage( strMessage );
}

//
// Do SetCursorPos if allowed
//
void CCore::CallSetCursorPos( int X, int Y )
{
if ( CCore::GetSingleton ().IsFocused () && !CLocalGUI::GetSingleton ().IsMainMenuVisible () )
m_pSetCursorPosHook->CallSetCursorPos(X,Y);
}
2 changes: 1 addition & 1 deletion MTA10/core/CCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class CCore : public CCoreInterface, public CSingleton < CCore >
void ApplyHooks3 ( bool bEnable );
HWND GetHookedWindow ( void );
void SwitchRenderWindow ( HWND hWnd, HWND hWndInput );
void CallSetCursorPos ( int X, int Y ) { m_pSetCursorPosHook->CallSetCursorPos(X,Y); }
void CallSetCursorPos ( int X, int Y );
void SetClientMessageProcessor ( pfnProcessMessage pfnMessageProcessor ) { m_pfnMessageProcessor = pfnMessageProcessor; };
pfnProcessMessage GetClientMessageProcessor ( void ) { return m_pfnMessageProcessor; }
void ChangeResolution ( long width, long height, long depth );
Expand Down

0 comments on commit cf4046e

Please sign in to comment.