mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- Fixed mouse boundary to game window for multi-monitor setup in full screen mode (vanilla bug) (by Buggler)
- Freed 'Ctrl+y' hotkey in tactical & laptop screen for other uses (by Buggler) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6407 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -50,7 +50,8 @@ extern BOOLEAN gfApplicationActive;
|
||||
BOOLEAN gfKeyState[256]; // TRUE = Pressed, FALSE = Not Pressed
|
||||
BOOLEAN fCursorWasClipped = FALSE;
|
||||
RECT gCursorClipRect;
|
||||
|
||||
extern BOOLEAN gfMouseLockedOnBorder;
|
||||
extern int iWindowedMode;
|
||||
|
||||
|
||||
// The gsKeyTranslationTables basically translates scan codes to our own key value table. Please note that the table is 2 bytes
|
||||
@@ -1590,10 +1591,23 @@ void RestrictMouseCursor(SGPRect *pRectangle)
|
||||
fCursorWasClipped = TRUE;
|
||||
}
|
||||
|
||||
void FreeMouseCursor(void)
|
||||
void FreeMouseCursor( BOOLEAN fLockForTacticalWindowedMode )
|
||||
{
|
||||
ClipCursor(NULL);
|
||||
fCursorWasClipped = FALSE;
|
||||
|
||||
// Buggler: Need to relock for fullscreen mode as ClipCursor release mouse boundary to full desktop resolution on multi-monitor setup &&
|
||||
// for windowed mode, lockscreen only when player activates feature in tactical screen due to mouse restriction applies to desktop too!
|
||||
if ( !iWindowedMode || ( iWindowedMode && gfMouseLockedOnBorder && fLockForTacticalWindowedMode ) )
|
||||
{
|
||||
SGPRect LJDRect;
|
||||
|
||||
LJDRect.iLeft = 0;
|
||||
LJDRect.iTop = 0;
|
||||
LJDRect.iRight = SCREEN_WIDTH;
|
||||
LJDRect.iBottom = SCREEN_HEIGHT;
|
||||
RestrictMouseCursor( &LJDRect );
|
||||
}
|
||||
}
|
||||
|
||||
void RestoreCursorClipRect( void )
|
||||
|
||||
Reference in New Issue
Block a user