X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Fvideo.c;h=dfdd2e50e33462b579e81569b8f90e7ce43777d0;hb=4c78a1bdd506cda6cda27ee342165c7dfa7ecdc2;hp=a30dd3770e3147faa73801a8ef1e627c21f6f15e;hpb=bf0187772ecfb475eedf5e0e9b8460b4f1a3f445;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/video.c b/Usermode/Applications/axwin3_src/WM/video.c index a30dd377..dfdd2e50 100644 --- a/Usermode/Applications/axwin3_src/WM/video.c +++ b/Usermode/Applications/axwin3_src/WM/video.c @@ -92,7 +92,7 @@ void Video_Update(void) _SysDebug("Video_Update - Sending FD %i %p 0x%x", giTerminalFD, gpScreenBuffer+ofs, size*4); _SysWrite(giTerminalFD, gpScreenBuffer+ofs, size*4); _SysDebug("Video_Update - Done"); - giVideo_FirstDirtyLine = 0; + giVideo_FirstDirtyLine = giScreenHeight; giVideo_LastDirtyLine = 0; } @@ -159,10 +159,8 @@ void Video_Blit(uint32_t *Source, short DstX, short DstY, short W, short H) if( W <= 0 || H <= 0 ) return; - if( DstY < giVideo_FirstDirtyLine ) - giVideo_FirstDirtyLine = DstY; - if( DstY + H > giVideo_LastDirtyLine ) - giVideo_LastDirtyLine = DstY + H; + giVideo_FirstDirtyLine = MIN(DstY, giVideo_FirstDirtyLine); + giVideo_LastDirtyLine = MAX(DstY+H, giVideo_LastDirtyLine); buf = gpScreenBuffer + DstY*giScreenWidth + DstX; if(drawW != giScreenWidth || W != giScreenWidth)