Usermode/AxWin3 - Debugging
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / video.c
index 5b513de..3916baa 100644 (file)
@@ -15,6 +15,9 @@
 #include <wm.h>
 #include <string.h>
 
+// === 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;
 

UCC git Repository :: git.ucc.asn.au