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:
terminx 2008-06-11 09:25:58 +00:00
parent fa46b7d155
commit fbc4633fef
3 changed files with 21 additions and 9 deletions

View file

@ -118,7 +118,7 @@ char videomodereset = 0;
// input and events
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;
static unsigned int mousewheel[2] = { 0,0 };
#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 (mousegrab)
{
grabmouse(0);
regrabmouse = 1;
}
realfs = fullscreen;
setgamemode(!fullscreen,xdim,ydim,bpp);
ShowWindow(hWindow, SW_MINIMIZE);
}
else if (appactive && realfs)
{
if (regrabmouse)
{
grabmouse(1);
regrabmouse = 0;
}
ShowWindow(hWindow, SW_SHOWNORMAL);
SetForegroundWindow(hWindow);
SetFocus(hWindow);

View file

@ -452,7 +452,7 @@ static const char *keyw[] =
"readarrayfromfile", // 320
"starttrackvar", // 321
"qgetsysstr", // 322
"getticks", // 323
"getticks", // 323
"<null>"
};
@ -3285,7 +3285,9 @@ static int parsecommand(void)
break;
}
case CON_GETTICKS:
case CON_GETTICKS:
if (CheckEventSync(current_event))
ReportError(WARNING_REVEVENTSYNC);
case CON_GETCURRADDRESS:
transvartype(GAMEVAR_FLAG_READONLY);
return 0;

View file

@ -4077,7 +4077,7 @@ static void alterang(int a)
static void move(void)
{
int l;
int l;
intptr_t *moveptr;
int a = g_sp->hitag, goalang, angdif;
int daxvel;
@ -7349,11 +7349,11 @@ static int parse(void)
hittype[g_i].flags = GetGameVarID(*insptr++, g_i, g_p);
break;
case CON_GETTICKS:
insptr++;
j=*insptr++;
SetGameVarID(j, getticks(), g_i, g_p);
break;
case CON_GETTICKS:
insptr++;
j=*insptr++;
SetGameVarID(j, getticks(), g_i, g_p);
break;
case CON_GETCURRADDRESS:
insptr++;