修正编译错误

This commit is contained in:
anod 2023-05-09 16:26:05 +08:00
parent 38d4420a9a
commit 648d092988
2 changed files with 23 additions and 21 deletions

View File

@ -115,7 +115,7 @@ Result dump_rom( u32 size )
u8 *p = ROM_LOC;
u32 len;
ee_printf("dumping into dump.gba, file size %d\n", size);
ee_printf("dumping into dump.gba, file size %ld\n", size);
for( u8 *p=ROM_LOC; size > 0; size-=len, p+=len )
{
res = fWrite( file, p, size < 256 ? size : 256, &len );
@ -129,7 +129,7 @@ Result dump_rom( u32 size )
break;
if( ((u32)p-ROM_LOC) % (1024*64) == 0)
ee_printf("\x1b[3;1Hremaining %d bytes to dump.\n", size);
ee_printf("\x1b[3;1Hremaining %ld bytes to dump.\n", size);
}
}
fClose( file );

View File

@ -1,3 +1,5 @@
#include <string.h>
#include <stdlib.h>
#include "types.h"
#include "arm11/pages.h"
#include "arm11/drivers/mcu.h"
@ -541,25 +543,7 @@ const u16 key_val[] = {
};
#define key_val_len (sizeof(key_val)/sizeof(u16))
static atp_error_t select_krp( atp_callerdata_t, atp_counter_t index, atp_itemcfg_t *cfg )
{
if( index < KEY_REMIX_LIMIT )
{
ee_snprintf(page_strbuf, sizeof(page_strbuf), "键位配置项%ld", index+1);
cfg->text = page_strbuf;
cfg->value = index;
key_remix_t *p = &g_keyremixConfig[index];
key_tips(p, 1, cfg);
}
else
{
cfg->text = index == KEY_REMIX_LIMIT ? "保存当前配置到SD卡" : "从SD卡加载已保存的配置";
cfg->value = KCP_OPTION_BASE + index-KEY_REMIX_LIMIT;
}
return ATP_SUCCESS;
}
static void key_tips( key_remix_t *p, atp_boolean_t checking, atp_itemcfg_t *cfg )
static inline void key_tips( key_remix_t *p, atp_boolean_t checking, atp_itemcfg_t *cfg )
{
if( p->remix_type == REMIX_TYPE_NONE )
{
@ -610,6 +594,24 @@ static void key_tips( key_remix_t *p, atp_boolean_t checking, atp_itemcfg_t *cfg
}
}
static atp_error_t select_krp( atp_callerdata_t, atp_counter_t index, atp_itemcfg_t *cfg )
{
if( index < KEY_REMIX_LIMIT )
{
ee_snprintf(page_strbuf, sizeof(page_strbuf), "键位配置项%ld", index+1);
cfg->text = page_strbuf;
cfg->value = index;
key_remix_t *p = &g_keyremixConfig[index];
key_tips(p, 1, cfg);
}
else
{
cfg->text = index == KEY_REMIX_LIMIT ? "保存当前配置到SD卡" : "从SD卡加载已保存的配置";
cfg->value = KCP_OPTION_BASE + index-KEY_REMIX_LIMIT;
}
return ATP_SUCCESS;
}
static atp_error_t select_kcf( atp_callerdata_t p, atp_counter_t index, atp_itemcfg_t *cfg )
{
key_remix_t *kcfg = (key_remix_t*)p;