mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
winlayer fullscreen polymost alt-tab mouse cursor fix
git-svn-id: https://svn.eduke32.com/eduke32@798 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fa46b7d155
commit
fbc4633fef
3 changed files with 21 additions and 9 deletions
|
@ -118,7 +118,7 @@ char videomodereset = 0;
|
||||||
|
|
||||||
// input and events
|
// input and events
|
||||||
char inputdevices=0;
|
char inputdevices=0;
|
||||||
char quitevent=0, appactive=1, realfs=0;
|
char quitevent=0, appactive=1, realfs=0, regrabmouse=0;
|
||||||
volatile int mousex=0, mousey=0, mouseb=0;
|
volatile int mousex=0, mousey=0, mouseb=0;
|
||||||
static unsigned int mousewheel[2] = { 0,0 };
|
static unsigned int mousewheel[2] = { 0,0 };
|
||||||
#define MouseWheelFakePressTime (50) // getticks() is a 1000Hz timer, and the button press is faked for 100ms
|
#define MouseWheelFakePressTime (50) // getticks() is a 1000Hz timer, and the button press is faked for 100ms
|
||||||
|
@ -4002,12 +4002,22 @@ static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
|
||||||
{
|
{
|
||||||
if (!appactive && fullscreen)
|
if (!appactive && fullscreen)
|
||||||
{
|
{
|
||||||
|
if (mousegrab)
|
||||||
|
{
|
||||||
|
grabmouse(0);
|
||||||
|
regrabmouse = 1;
|
||||||
|
}
|
||||||
realfs = fullscreen;
|
realfs = fullscreen;
|
||||||
setgamemode(!fullscreen,xdim,ydim,bpp);
|
setgamemode(!fullscreen,xdim,ydim,bpp);
|
||||||
ShowWindow(hWindow, SW_MINIMIZE);
|
ShowWindow(hWindow, SW_MINIMIZE);
|
||||||
}
|
}
|
||||||
else if (appactive && realfs)
|
else if (appactive && realfs)
|
||||||
{
|
{
|
||||||
|
if (regrabmouse)
|
||||||
|
{
|
||||||
|
grabmouse(1);
|
||||||
|
regrabmouse = 0;
|
||||||
|
}
|
||||||
ShowWindow(hWindow, SW_SHOWNORMAL);
|
ShowWindow(hWindow, SW_SHOWNORMAL);
|
||||||
SetForegroundWindow(hWindow);
|
SetForegroundWindow(hWindow);
|
||||||
SetFocus(hWindow);
|
SetFocus(hWindow);
|
||||||
|
|
|
@ -3286,6 +3286,8 @@ static int parsecommand(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
case CON_GETTICKS:
|
case CON_GETTICKS:
|
||||||
|
if (CheckEventSync(current_event))
|
||||||
|
ReportError(WARNING_REVEVENTSYNC);
|
||||||
case CON_GETCURRADDRESS:
|
case CON_GETCURRADDRESS:
|
||||||
transvartype(GAMEVAR_FLAG_READONLY);
|
transvartype(GAMEVAR_FLAG_READONLY);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue