Solved my image freze on resizing bug (lost video adapter):
Moved game to the system disc (C:\ in my case, the game was moved in Steam GUI).
This solution was found here:
https://forums.faforever.com/viewtopic.php?f=3&t=18603
@thecore, the mouse clip (from v 1.04) is broken for a not fullscreen window, maybe a Windows 10 ui scaling involved here - it locks mouse but in the area with lesser width and height then actual window and actual window size is more when what I set it to be in args.
Here is the working variant for any window size:
if(clipMouse = true)
{
SetTimer, clipProc, 100
}
clipProc:
if (!ProcessExist(procGame))
return
;//checks if the game window is active
if !WinActive("ahk_exe " procGame)
{
return
}
; this will get your game window size
WinGetTitle, winTitle, ahk_exe %procGame%
WinGetPos, X, Y, W, H, %winTitle%
;//trap mouse
ClipCursor( true, X, Y, W, H)
return
; //lock the mouse within the game window
ClipCursor( Confine=True, x1=0 , y1=0, x2=1, y2=1 )
{
VarSetCapacity(R,16,0), NumPut(x1,&R+0),NumPut(y1,&R+4),NumPut(x2,&R+8),NumPut(y2,&R+12)
return Confine ? DllCall( "ClipCursor", UInt,&R ) : DllCall( "ClipCursor" )
}
full script here (just delete .txt to use it):
definitiveResizeAndMouseLock.ahk.txt