X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=inline;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Fvideo.c;h=3916baa1f6061d572b9ba27e1f05e93adfaf9ee4;hb=21192b41da0f87dba07dac08b2d814b0976d929c;hp=5b513decf2e2dc6f3b649874a3b7c93182a0b4d6;hpb=11dbd684e9a3d907d43d71a3145205f1a86992fb;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/video.c b/Usermode/Applications/axwin3_src/WM/video.c index 5b513dec..3916baa1 100644 --- a/Usermode/Applications/axwin3_src/WM/video.c +++ b/Usermode/Applications/axwin3_src/WM/video.c @@ -15,6 +15,9 @@ #include #include +// === IMPORTS === +extern int giTerminalFD_Input; + // === PROTOTYPES === void Video_Setup(void); void Video_SetCursorPos(short X, short Y); @@ -43,6 +46,7 @@ void Video_Setup(void) } #else giTerminalFD = 1; + giTerminalFD_Input = 0; // Check that the console is a VT // - ioctl(..., 0, NULL) returns the type, which should be 2 if( ioctl(1, 0, NULL) != 2 ) @@ -84,7 +88,7 @@ void Video_Update(void) _SysDebug("Video_Update - Updating lines %i to %i (0x%x+0x%x px)", giVideo_FirstDirtyLine, giVideo_LastDirtyLine, ofs, size); seek(giTerminalFD, ofs*4, 1); - _SysDebug("Video_Update - Sending"); + _SysDebug("Video_Update - Sending FD %i %p 0x%x", giTerminalFD, gpScreenBuffer+ofs, size*4); write(giTerminalFD, gpScreenBuffer+ofs, size*4); _SysDebug("Video_Update - Done"); giVideo_FirstDirtyLine = 0; @@ -136,7 +140,7 @@ void Video_Blit(uint32_t *Source, short DstX, short DstY, short W, short H) // TODO: Handle out of bounds by clipping too if( DstX + W > giScreenWidth ) return; if( DstY + H > giScreenHeight ) - H = giScreenWidth - DstY; + H = giScreenHeight - DstY; if( W <= 0 || H <= 0 ) return;