From 4069dcb53d0ecb6b7d58fa2fa205df7fb25c2447 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Wed, 19 Oct 2022 18:48:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=BC=96=E8=AF=91=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/atp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/arm11/atp.c b/source/arm11/atp.c index 6134fbf..cafedad 100644 --- a/source/arm11/atp.c +++ b/source/arm11/atp.c @@ -77,7 +77,7 @@ const char *acf_put_text(int x, int y, int width, int height, int maxwidth, u8 c static void screen_clean() { - memset(consoleGet()->frameBuffer, 0, WINDOW_WIDTH*WINDOW_HEIGHT*sizeof(uint16_t)); + memset(GFX_getFramebuffer(SCREEN_BOT), 0, WINDOW_WIDTH*WINDOW_HEIGHT*sizeof(uint16_t)); if( ta[0] ) acf_put_text( 5, 215, WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_WIDTH-10, ATP_COLOR_CYAN, ATP_PLACEMENT_LEFT, ta ); if( tb[0] ) acf_put_text( 5, 215, WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_WIDTH-10, ATP_COLOR_CYAN, ATP_PLACEMENT_RIGHT, tb ); } @@ -87,7 +87,8 @@ static void screen_clean_zone( int x, int y, int w, int h ) if( x < 0 || y < 0 || x+w >= WINDOW_WIDTH || y+h >=WINDOW_HEIGHT ) return; - for( int i=0; i < w; i++ ) memset( consoleGet()->frameBuffer + WINDOW_HEIGHT*(i+x) + (WINDOW_HEIGHT-1-y-h), 0, h*sizeof(u16) ); + int location= GFX_getFramebuffer(SCREEN_BOT); + for( int i=0; i < w; i++ ) memset( location + WINDOW_HEIGHT*(i+x) + (WINDOW_HEIGHT-1-y-h), 0, h*sizeof(u16) ); } // wait key pressed, if power key is pressed, return 0