mirror of
https://github.com/CTCaer/hekate
synced 2024-11-16 00:49:27 +00:00
Small unfattening
This commit is contained in:
parent
0c5c827d0b
commit
e5a34c3818
5 changed files with 566 additions and 704 deletions
3
Makefile
3
Makefile
|
@ -51,6 +51,9 @@ LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections
|
|||
.PHONY: all clean
|
||||
|
||||
all: $(TARGET).bin
|
||||
@echo -n "Payload size is "
|
||||
@wc -c < $(TARGET).bin
|
||||
@echo "Max size is 126296 Bytes."
|
||||
|
||||
clean:
|
||||
@rm -rf $(OBJS)
|
||||
|
|
11
ipl/ff.c
11
ipl/ff.c
|
@ -27,7 +27,7 @@
|
|||
#include "gfx.h"
|
||||
extern gfx_ctxt_t gfx_ctxt;
|
||||
extern gfx_con_t gfx_con;
|
||||
#define EFSPRINTF(text, ...) gfx_printf(&gfx_con, "\n\n\n%k[FatFS] Error: "text"%k\n", 0xFFFFFF00, 0xFFFFFFFF)
|
||||
#define EFSPRINTF(text, ...) print_error(); gfx_printf(&gfx_con, "%k"text"%k\n", 0xFFFFFF00, 0xFFFFFFFF);\
|
||||
//#define EFSPRINTF(...)
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
|
@ -569,6 +569,15 @@ static const BYTE DbcTbl[] = MKCVTBL(TBL_DC, FF_CODE_PAGE);
|
|||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* Print error header */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
void print_error()
|
||||
{
|
||||
gfx_printf(&gfx_con, "\n\n\n%k[FatFS] Error: %k", 0xFFFFFF00, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* Load/Store multi-byte word in the FAT structure */
|
||||
|
|
1233
ipl/hekate_logos.h
1233
ipl/hekate_logos.h
File diff suppressed because it is too large
Load diff
15
ipl/main.c
15
ipl/main.c
|
@ -146,7 +146,7 @@ int sd_save_to_file(void * buf, u32 size, const char * filename)
|
|||
u32 res = 0;
|
||||
res = f_open(&fp, filename, FA_CREATE_ALWAYS | FA_WRITE);
|
||||
if (res) {
|
||||
EPRINTFARGS("Error (%d) creating file %s.\n", res, filename);
|
||||
EPRINTFARGS("Error (%d) creating file\n%s.\n", res, filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1395,13 +1395,14 @@ void launch_firmware()
|
|||
if (!hos_launch(cfg_sec))
|
||||
{
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
Kc_MENU_LOGO = (u8 *)malloc(36864);
|
||||
Kc_MENU_LOGO = (u8 *)malloc(0x6000);
|
||||
LZ_Uncompress(Kc_MENU_LOGOlz, Kc_MENU_LOGO, SZ_MENU_LOGOLZ);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
EPRINTF("Failed to launch firmware.");
|
||||
}
|
||||
|
||||
ini_free_section(cfg_sec);
|
||||
sd_unmount();
|
||||
|
||||
btn_wait();
|
||||
}
|
||||
|
@ -1524,7 +1525,7 @@ void print_fuel_gauge_info()
|
|||
gfx_printf(&gfx_con, "Age: %3d%\n", value);
|
||||
|
||||
max17050_get_property(MAX17050_Cycles, &value);
|
||||
gfx_printf(&gfx_con, "Charge cycle count: %4d\n", value);
|
||||
gfx_printf(&gfx_con, "Charge cycle count: %3d%\n", value);
|
||||
|
||||
max17050_get_property(MAX17050_TEMP, &value);
|
||||
if (value >= 0)
|
||||
|
@ -1687,7 +1688,7 @@ void print_battery_info()
|
|||
free(buf);
|
||||
}
|
||||
|
||||
void fix_fuel_gauge_configuration()
|
||||
/* void fix_fuel_gauge_configuration()
|
||||
{
|
||||
gfx_clear_grey(&gfx_ctxt, 0x1B);
|
||||
gfx_con_setpos(&gfx_con, 0, 0);
|
||||
|
@ -1697,7 +1698,7 @@ void fix_fuel_gauge_configuration()
|
|||
max17050_get_property(MAX17050_VCELL, &battVoltage);
|
||||
max17050_get_property(MAX17050_AvgCurrent, &avgCurrent);
|
||||
|
||||
//Check if still charging. If not, check if battery is >= 95% (4.1V).
|
||||
// Check if still charging. If not, check if battery is >= 95% (4.1V).
|
||||
if (avgCurrent < 0 && battVoltage > 4100)
|
||||
{
|
||||
if ((avgCurrent / 1000) < -10)
|
||||
|
@ -1736,7 +1737,7 @@ void fix_fuel_gauge_configuration()
|
|||
|
||||
sleep(500000);
|
||||
btn_wait();
|
||||
}
|
||||
} */
|
||||
|
||||
void fix_battery_desync()
|
||||
{
|
||||
|
@ -1980,7 +1981,7 @@ void ipl_main()
|
|||
gfx_clear_grey(&gfx_ctxt, 0x1B);
|
||||
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
Kc_MENU_LOGO = (u8 *)malloc(36864);
|
||||
Kc_MENU_LOGO = (u8 *)malloc(0x6000);
|
||||
LZ_Uncompress(Kc_MENU_LOGOlz, Kc_MENU_LOGO, SZ_MENU_LOGOLZ);
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
|
||||
#ifdef MENU_LOGO_ENABLE
|
||||
extern u8 *Kc_MENU_LOGO;
|
||||
#define X_MENU_LOGO 158
|
||||
#define Y_MENU_LOGO 76
|
||||
#define X_POS_MENU_LOGO 538
|
||||
#define Y_POS_MENU_LOGO 1180
|
||||
#define X_MENU_LOGO 119
|
||||
#define Y_MENU_LOGO 57
|
||||
#define X_POS_MENU_LOGO 577
|
||||
#define Y_POS_MENU_LOGO 1199
|
||||
#endif //MENU_LOGO_ENABLE
|
||||
|
||||
void tui_pbar(gfx_con_t *con, int x, int y, u32 val, u32 fgcol, u32 bgcol)
|
||||
|
|
Loading…
Reference in a new issue