--- np2/win9x/scrnmng.cpp 2003/10/16 17:58:47 1.1 +++ np2/win9x/scrnmng.cpp 2003/10/21 11:22:05 1.3 @@ -1,16 +1,17 @@ #include "compiler.h" #include +#ifndef __GNUC__ #include +#endif #include "resource.h" #include "np2.h" #include "mousemng.h" #include "scrnmng.h" #include "sysmng.h" -#include "pccore.h" -#include "scrndraw.h" -#include "palettes.h" #include "dclock.h" #include "menu.h" +#include "scrndraw.h" +#include "palettes.h" typedef struct { @@ -127,7 +128,7 @@ static void renewalclientsize(void) { else { multiple = scrnstat.multiple; if (!(ddraw.scrnmode & SCRNMODE_ROTATE)) { - if (np2oscfg.paddingx) { + if ((np2oscfg.paddingx) && (multiple == 8)) { extend = min(scrnstat.extend, ddraw.extend); } scrnwidth = (width * multiple) >> 3; @@ -138,7 +139,7 @@ static void renewalclientsize(void) { ddraw.scrn.top = np2oscfg.paddingy; } else { - if (np2oscfg.paddingy) { + if ((np2oscfg.paddingy) && (multiple == 8)) { extend = min(scrnstat.extend, ddraw.extend); } scrnwidth = (height * multiple) >> 3; @@ -229,9 +230,9 @@ static void paletteinit(void) { GetSystemPaletteEntries(hdc, 0, 256, ddraw.pal); ReleaseDC(hWndMain, hdc); for (i=0; i<4; i++) { - ddraw.pal[i+START_PALORG].peBlue = dclock_pal[i].p.b; - ddraw.pal[i+START_PALORG].peRed = dclock_pal[i].p.r; - ddraw.pal[i+START_PALORG].peGreen = dclock_pal[i].p.g; + ddraw.pal[i+START_PALORG].peBlue = dclockpal.pal32[i].p.b; + ddraw.pal[i+START_PALORG].peRed = dclockpal.pal32[i].p.r; + ddraw.pal[i+START_PALORG].peGreen = dclockpal.pal32[i].p.g; ddraw.pal[i+START_PALORG].peFlags = PC_RESERVED | PC_NOCOLLAPSE; } for (i=0; i>= 1; sft++; } @@ -277,7 +278,7 @@ static void make16mask(DWORD bmask, DWOR ddraw.l16r = sft; sft = 0; - while((gmask & 0xffffff0) && (sft < 32)) { + while((gmask & 0xffffff00) && (sft < 32)) { gmask >>= 1; sft++; } @@ -445,6 +446,7 @@ BOOL scrnmng_create(BYTE scrnmode) { else { goto scre_err; } + ddraw.extend = 1; } scrnmng.bpp = (BYTE)bitcolor; scrnsurf.bpp = bitcolor; @@ -512,14 +514,18 @@ void scrnmng_topwinui(void) { if (scrnmng.flag & SCRNFLAG_FULLSCREEN) { ddraw.primsurf->SetClipper(ddraw.clipper); } +#ifndef __GNUC__ WINNLSEnableIME(hWndMain, TRUE); +#endif } } void scrnmng_clearwinui(void) { if ((ddraw.cliping > 0) && (!(--ddraw.cliping))) { +#ifndef __GNUC__ WINNLSEnableIME(hWndMain, FALSE); +#endif if (scrnmng.flag & SCRNFLAG_FULLSCREEN) { ddraw.primsurf->SetClipper(0); } @@ -628,6 +634,14 @@ void scrnmng_update(void) { // ---- +void scrnmng_setmultiple(int multiple) { + + if (scrnstat.multiple != multiple) { + scrnstat.multiple = multiple; + renewalclientsize(); + } +} + static const RECT rectclk = {0, 0, DCLOCK_X, DCLOCK_Y}; void scrnmng_dispclock(void) {