mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-04 12:50:57 +00:00
Patch from hunter_rus
git-svn-id: https://svn.eduke32.com/eduke32@698 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
dff876f1d0
commit
65d095f88a
2 changed files with 36 additions and 34 deletions
|
@ -944,7 +944,8 @@ static int mdloadskin(md2model *m, int number, int pal, int surf)
|
||||||
{
|
{
|
||||||
osizx = cachead.xdim;
|
osizx = cachead.xdim;
|
||||||
osizy = cachead.ydim;
|
osizy = cachead.ydim;
|
||||||
m->usesalpha = hasalpha = (cachead.flags & 2) ? 1 : 0;
|
hasalpha = (cachead.flags & 2) ? 1 : 0;
|
||||||
|
if (pal < (MAXPALOOKUPS - RESERVEDPALS))m->usesalpha = hasalpha;
|
||||||
kclose(cachefil);
|
kclose(cachefil);
|
||||||
//kclose(filh); // FIXME: uncomment when cache1d.c is fixed
|
//kclose(filh); // FIXME: uncomment when cache1d.c is fixed
|
||||||
// cachefil >= 0, so it won't be rewritten
|
// cachefil >= 0, so it won't be rewritten
|
||||||
|
@ -963,7 +964,7 @@ static int mdloadskin(md2model *m, int number, int pal, int surf)
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
else kclose(filh);
|
else kclose(filh);
|
||||||
m->usesalpha = hasalpha;
|
if (pal < (MAXPALOOKUPS - RESERVEDPALS))m->usesalpha = hasalpha;
|
||||||
if (pal>=SPECPAL&&pal<=REDPAL)
|
if (pal>=SPECPAL&&pal<=REDPAL)
|
||||||
{
|
{
|
||||||
//_initprintf("%cLoaded palmap %d(%dx%d)",sk->palmap?'+':'-',pal,xsiz,ysiz);
|
//_initprintf("%cLoaded palmap %d(%dx%d)",sk->palmap?'+':'-',pal,xsiz,ysiz);
|
||||||
|
|
|
@ -811,6 +811,7 @@ DWORD WINAPI MouseFunc()
|
||||||
{
|
{
|
||||||
while (moustat&&lpDID[MOUSE])
|
while (moustat&&lpDID[MOUSE])
|
||||||
{
|
{
|
||||||
|
if (!appactive)Sleep(50);else
|
||||||
if ((WaitForSingleObject(inputevt[MOUSE], INFINITE)) == WAIT_OBJECT_0)
|
if ((WaitForSingleObject(inputevt[MOUSE], INFINITE)) == WAIT_OBJECT_0)
|
||||||
{
|
{
|
||||||
ProcessMouse();
|
ProcessMouse();
|
||||||
|
@ -829,6 +830,7 @@ int initmouse(void)
|
||||||
|
|
||||||
initprintf("Initializing mouse... ");
|
initprintf("Initializing mouse... ");
|
||||||
|
|
||||||
|
moustat=1;
|
||||||
mousethread = CreateThread
|
mousethread = CreateThread
|
||||||
(
|
(
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -850,7 +852,6 @@ int initmouse(void)
|
||||||
initprintf("OK\n");
|
initprintf("OK\n");
|
||||||
|
|
||||||
// grab input
|
// grab input
|
||||||
moustat=1;
|
|
||||||
grabmouse(1);
|
grabmouse(1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1492,11 +1493,11 @@ static void ProcessMouse()
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
t = getticks();
|
t = getticks();
|
||||||
|
if (!mousegrab) break;
|
||||||
result = IDirectInputDevice2_GetDeviceData(lpDID[MOUSE], sizeof(DIDEVICEOBJECTDATA),
|
result = IDirectInputDevice2_GetDeviceData(lpDID[MOUSE], sizeof(DIDEVICEOBJECTDATA),
|
||||||
(LPDIDEVICEOBJECTDATA)&didod, &dwElements, 0);
|
(LPDIDEVICEOBJECTDATA)&didod, &dwElements, 0);
|
||||||
|
|
||||||
if (FAILED(result) || !dwElements)break;
|
if (FAILED(result) || !dwElements)break;
|
||||||
if (!mousegrab) break;
|
|
||||||
|
|
||||||
if (result == DI_OK)
|
if (result == DI_OK)
|
||||||
{
|
{
|
||||||
|
@ -1572,7 +1573,7 @@ static void ProcessInputDevices(void)
|
||||||
|
|
||||||
for (t = 0; t < NUM_INPUTS; t++)
|
for (t = 0; t < NUM_INPUTS; t++)
|
||||||
{
|
{
|
||||||
if (*devicedef[t].did)
|
if (*devicedef[t].did&&t!=MOUSE)
|
||||||
{
|
{
|
||||||
result = IDirectInputDevice2_Poll(*devicedef[t].did);
|
result = IDirectInputDevice2_Poll(*devicedef[t].did);
|
||||||
if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED)
|
if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED)
|
||||||
|
|
Loading…
Reference in a new issue