--- np2/vram/dispsync.c 2003/10/16 17:58:15 1.1 +++ np2/vram/dispsync.c 2004/02/07 21:23:22 1.3 @@ -27,6 +27,20 @@ void dispsync_init(void) { BOOL dispsync_renewalmode(void) { + UINT disp; + + if (!scrnmng_haveextend()) { + return(FALSE); + } + disp = 0; + if ((!(np2cfg.LCD_MODE & 1)) && (gdc.display < 3)) { + disp = 1; + } + if (dsync.scrnxextend != disp) { + dsync.scrnxextend = disp; + scrnmng_setextend(disp); + return(1); + } return(0); } @@ -46,7 +60,8 @@ BOOL dispsync_renewalhorizontal(void) { } scrnxmax = cr + 2; if ((scrnxpos + scrnxmax) > 80) { - scrnxmax = 80 - scrnxpos; + scrnxmax = min(scrnxmax, 80); + scrnxpos = 80 - scrnxmax; } scrnxpos <<= 3; scrnxmax <<= 3;