mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 10:40:47 +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);
|
||||||
|
|
|
@ -452,7 +452,7 @@ static const char *keyw[] =
|
||||||
"readarrayfromfile", // 320
|
"readarrayfromfile", // 320
|
||||||
"starttrackvar", // 321
|
"starttrackvar", // 321
|
||||||
"qgetsysstr", // 322
|
"qgetsysstr", // 322
|
||||||
"getticks", // 323
|
"getticks", // 323
|
||||||
"<null>"
|
"<null>"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3285,7 +3285,9 @@ static int parsecommand(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -4077,7 +4077,7 @@ static void alterang(int a)
|
||||||
|
|
||||||
static void move(void)
|
static void move(void)
|
||||||
{
|
{
|
||||||
int l;
|
int l;
|
||||||
intptr_t *moveptr;
|
intptr_t *moveptr;
|
||||||
int a = g_sp->hitag, goalang, angdif;
|
int a = g_sp->hitag, goalang, angdif;
|
||||||
int daxvel;
|
int daxvel;
|
||||||
|
@ -7349,11 +7349,11 @@ static int parse(void)
|
||||||
hittype[g_i].flags = GetGameVarID(*insptr++, g_i, g_p);
|
hittype[g_i].flags = GetGameVarID(*insptr++, g_i, g_p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CON_GETTICKS:
|
case CON_GETTICKS:
|
||||||
insptr++;
|
insptr++;
|
||||||
j=*insptr++;
|
j=*insptr++;
|
||||||
SetGameVarID(j, getticks(), g_i, g_p);
|
SetGameVarID(j, getticks(), g_i, g_p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CON_GETCURRADDRESS:
|
case CON_GETCURRADDRESS:
|
||||||
insptr++;
|
insptr++;
|
||||||
|
|
Loading…
Reference in a new issue