From: John Hodge Date: Sun, 16 Feb 2014 03:57:18 +0000 (+0800) Subject: Usermode/AxWin3 - Commenting and other minors X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;ds=sidebyside;h=881e7ca0b658a659781c13a3e04e785ffba059b6;p=tpg%2Facess2.git Usermode/AxWin3 - Commenting and other minors --- diff --git a/Usermode/Applications/axwin3_src/WM/video.c b/Usermode/Applications/axwin3_src/WM/video.c index 98c88c86..2f6fff83 100644 --- a/Usermode/Applications/axwin3_src/WM/video.c +++ b/Usermode/Applications/axwin3_src/WM/video.c @@ -89,6 +89,7 @@ void Video_Setup(void) // Create local framebuffer (back buffer) gpScreenBuffer = malloc( giScreenWidth*giScreenHeight*4 ); + //gpScreenBuffer = _SysMemMap( giTerminalFD, 0, giScreenWidth*giScreenHeight*4, NULL); // Set cursor position and bitmap { @@ -159,19 +160,17 @@ void Video_SetCursorPos(short X, short Y) void Video_FillRect(int X, int Y, int W, int H, uint32_t Colour) { - uint32_t *dest; - int i; - if(X < 0 || Y < 0) return; + if(W < 0 || H < 0) return; if(W >= giScreenWidth) return; if(H >= giScreenHeight) return; if(X + W >= giScreenWidth) W = giScreenWidth - W; if(Y + H >= giScreenHeight) W = giScreenHeight - H; - dest = gpScreenBuffer + Y * giScreenWidth + X; + uint32_t *dest = gpScreenBuffer + Y * giScreenWidth + X; while(H --) { - for( i = W; i --; dest ++ ) *dest = Colour; + for( int i = W; i --; dest ++ ) *dest = Colour; dest += giScreenWidth - W; } } diff --git a/Usermode/Applications/axwin3_src/WM/wm.c b/Usermode/Applications/axwin3_src/WM/wm.c index 342f4104..b304cacd 100644 --- a/Usermode/Applications/axwin3_src/WM/wm.c +++ b/Usermode/Applications/axwin3_src/WM/wm.c @@ -601,6 +601,7 @@ void WM_int_BlitWindow(tWindow *Window, int bForceReblit) bForceReblit = 1; } + // Draw cursor if( Window == gpWM_FocusedWindow && Window->CursorW ) { Video_FillRect(