Patch from hunter_rus

git-svn-id: https://svn.eduke32.com/eduke32@698 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-04-07 00:43:09 +00:00
parent dff876f1d0
commit 65d095f88a
2 changed files with 36 additions and 34 deletions

View file

@ -944,7 +944,8 @@ static int mdloadskin(md2model *m, int number, int pal, int surf)
{
osizx = cachead.xdim;
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(filh); // FIXME: uncomment when cache1d.c is fixed
// 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);
}
else kclose(filh);
m->usesalpha = hasalpha;
if (pal < (MAXPALOOKUPS - RESERVEDPALS))m->usesalpha = hasalpha;
if (pal>=SPECPAL&&pal<=REDPAL)
{
//_initprintf("%cLoaded palmap %d(%dx%d)",sk->palmap?'+':'-',pal,xsiz,ysiz);

View file

@ -811,6 +811,7 @@ DWORD WINAPI MouseFunc()
{
while (moustat&&lpDID[MOUSE])
{
if (!appactive)Sleep(50);else
if ((WaitForSingleObject(inputevt[MOUSE], INFINITE)) == WAIT_OBJECT_0)
{
ProcessMouse();
@ -829,6 +830,7 @@ int initmouse(void)
initprintf("Initializing mouse... ");
moustat=1;
mousethread = CreateThread
(
NULL,
@ -850,7 +852,6 @@ int initmouse(void)
initprintf("OK\n");
// grab input
moustat=1;
grabmouse(1);
return 0;
@ -1492,11 +1493,11 @@ static void ProcessMouse()
while (1)
{
t = getticks();
if (!mousegrab) break;
result = IDirectInputDevice2_GetDeviceData(lpDID[MOUSE], sizeof(DIDEVICEOBJECTDATA),
(LPDIDEVICEOBJECTDATA)&didod, &dwElements, 0);
if (FAILED(result) || !dwElements)break;
if (!mousegrab) break;
if (result == DI_OK)
{
@ -1572,7 +1573,7 @@ static void ProcessInputDevices(void)
for (t = 0; t < NUM_INPUTS; t++)
{
if (*devicedef[t].did)
if (*devicedef[t].did&&t!=MOUSE)
{
result = IDirectInputDevice2_Poll(*devicedef[t].did);
if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED)