- 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:
Wanne
2013-09-16 06:22:00 +00:00
parent 0f17320e8f
commit c3d88744b9
15 changed files with 48 additions and 30 deletions
+16 -2
View File
@@ -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 )