--- xmil/win9x/scrnmng.cpp 2004/08/07 12:10:27 1.6 +++ xmil/win9x/scrnmng.cpp 2004/08/17 12:30:41 1.9 @@ -241,14 +241,14 @@ static void paletteinit(void) { hdc = GetDC(hWndMain); GetSystemPaletteEntries(hdc, 0, 256, ddraw.pal); ReleaseDC(hWndMain, hdc); - for (i=START_PAL; i<(START_PAL + TOTAL_PALS); i++) { - ddraw.pal[i].peFlags = PC_RESERVED | PC_NOCOLLAPSE; + for (i=0; iCreatePalette(DDPCAPS_8BIT, ddraw.pal, &ddraw.palette, 0); @@ -258,15 +258,15 @@ static void paletteinit(void) { static void paletteset(void) { - int i; + UINT i; - if ((ddraw.palette != NULL) && (xm_palettes)) { - for (i=0; iSetEntries(0, START_PAL, xm_palettes, + ddraw.palette->SetEntries(0, START_PAL, xmil_palettes, &ddraw.pal[START_PAL]); } } @@ -741,7 +741,8 @@ void scrnmng_dispclock(void) { DDSURFACEDESC dest; - if ((ddraw.clocksurf) && (dclock_disp())) { + if ((ddraw.clocksurf) && + (ddraw.scrn.top >= DCLOCK_Y) && (dclock_disp())) { dclock_make(); ZeroMemory(&dest, sizeof(dest)); dest.dwSize = sizeof(dest); @@ -755,7 +756,7 @@ void scrnmng_dispclock(void) { ddraw.clocksurf->Unlock(NULL); } if (ddraw.primsurf->BltFast(640 - DCLOCK_X - 4, - 480 - DCLOCK_Y - 8, + ddraw.height - DCLOCK_Y, ddraw.clocksurf, (RECT *)&rectclk, DDBLTFAST_WAIT) == DDERR_SURFACELOST) { ddraw.primsurf->Restore();