From 881e7ca0b658a659781c13a3e04e785ffba059b6 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 16 Feb 2014 11:57:18 +0800 Subject: [PATCH] Usermode/AxWin3 - Commenting and other minors --- Usermode/Applications/axwin3_src/WM/video.c | 9 ++++----- Usermode/Applications/axwin3_src/WM/wm.c | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) 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( -- 2.20.1