From 097d6ce9a3e85437f2b003804a2cddaeb5cd7302 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 20 Oct 2013 22:54:16 +0000 Subject: [PATCH] notify: small fix for redraw git-svn-id: svn://kolibrios.org@4064 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/notify/notify.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/programs/cmm/notify/notify.c b/programs/cmm/notify/notify.c index a07a3551fe..ac2b9485f6 100644 --- a/programs/cmm/notify/notify.c +++ b/programs/cmm/notify/notify.c @@ -78,21 +78,32 @@ _next: $loop _next } +void DrawBackground() +{ + PutPaletteImage(shadow_buf_32+8,WIN_SIZE_X,WIN_SIZE_Y,0,0,32,0); + PutPixel(0,0,ESDWORD[lighter_pixel1]); + PutPixel(0,WIN_SIZE_Y-1,ESDWORD[lighter_pixel2]); +} void GetBackground() { int i; + static int was_once; + if (was_once) + { + DrawBackground(); + return; + } for (i=1; i<=6; i++) { + was_once = 1; ShadowImage(shadow_buf_24, WIN_SIZE_X, WIN_SIZE_Y, 1); if (i%2 == 0) ShadowImage(lighter_pixel1, 1, 1, 1); if (i%2 == 0) ShadowImage(lighter_pixel2, 1, 1, 1); from24to32(shadow_buf_24, shadow_buf_32+8, WIN_SIZE_X, WIN_SIZE_Y); Text(); - PutPaletteImage(shadow_buf_32+8,WIN_SIZE_X,WIN_SIZE_Y,0,0,32,0); - PutPixel(0,0,ESDWORD[lighter_pixel1]); - PutPixel(0,WIN_SIZE_Y-1,ESDWORD[lighter_pixel2]); + DrawBackground(); pause(5); } }