From c7f0f4f3425d1e4e626efc267ba01d61594415a6 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Fri, 21 Oct 2022 11:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=BE=E7=A4=BA=E7=94=B5?= =?UTF-8?q?=E9=87=8F=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/main.c | 2 +- source/arm11/open_agb_firm.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/arm11/main.c b/source/arm11/main.c index 0679753..70a4fe7 100644 --- a/source/arm11/main.c +++ b/source/arm11/main.c @@ -51,7 +51,7 @@ int main(void) { Result res = fMount(FS_DRIVE_SDMC); if(res == RES_OK) res = oafParseConfigEarly(); - GFX_init(GFX_RGB565, GFX_RGB565); + GFX_init(GFX_BGR8, GFX_RGB565); setBacklight(); consoleInit(SCREEN_BOT, NULL); //CODEC_init(); diff --git a/source/arm11/open_agb_firm.c b/source/arm11/open_agb_firm.c index 570bf94..77b2199 100644 --- a/source/arm11/open_agb_firm.c +++ b/source/arm11/open_agb_firm.c @@ -238,10 +238,12 @@ static atp_pageopt_t config_adjust( atp_callerdata_t, atp_counter_t index, atp_b atp_error_t oaf_config_page() { u8 base[sizeof(g_oafConfig)]; + char title[64]; memcpy( base, &g_oafConfig, sizeof(g_oafConfig) ); OafConfig *prev = (OafConfig*)&base[0]; - atp_error_t res = atp_select( "参数配置", 4, config_item, config_adjust, NULL, 0, 0, NULL ); + ee_snprintf(title, sizeof(title), "参数配置          电量%d%%", MCU_getBatteryLevel()); + atp_error_t res = atp_select( title, 4, config_item, config_adjust, NULL, 0, 0, NULL ); if( res == ATP_NO_ACTION ) { memcpy( &g_oafConfig, prev, sizeof(g_oafConfig) ); @@ -682,7 +684,7 @@ static void gbaGfxHandler(void *args) // 0x18180000 <----------> screen_top + 16*240*3 + 120 是正确对准,左边对16求余为0,右边为8 // 现在右边加上8,是2|2/3个像素 GX_displayTransfer((u32*)(0x18180000 + 16*240*3), 368u<<16 | 240u, - GFX_getFramebuffer(SCREEN_TOP) + 16*240*2 + 80, 368u<<16 | 240u, 2u<<12 | 1u<<8); + GFX_getFramebuffer(SCREEN_TOP) + 16*240*3 + 96, 368u<<16 | 240u, 2u<<12 | 1u<<8); } else GX_displayTransfer((u32*)(0x18180000 + 16*240*3), 368u<<16 | 240u, GFX_getFramebuffer(SCREEN_TOP) + 16*240*3, 368u<<16 | 240u, 1u<<12 | 1u<<8);