hekate/nyx: stylistic corrections

This commit is contained in:
CTCaer
2023-02-11 23:51:43 +02:00
parent 9a98c1afb9
commit 5193416658
11 changed files with 53 additions and 51 deletions

View File

@@ -643,7 +643,7 @@ void manual_system_maintenance(bool refresh)
for (u32 task_idx = 0; task_idx < (sizeof(system_maintenance_tasks_t) / sizeof(lv_task_t *)); task_idx++)
{
lv_task_t *task = system_tasks.tasks[task_idx];
if(task && (lv_tick_elaps(task->last_run) >= task->period))
if (task && (lv_tick_elaps(task->last_run) >= task->period))
{
task->last_run = lv_tick_get();
task->task(task->param);

View File

@@ -503,7 +503,7 @@ static void _migrate_sd_backup_file_based()
for (int j = 0; j < 100; j++)
{
update_emummc_base_folder(emu_path, base_len, j);
if(f_stat(emu_path, NULL) == FR_NO_FILE)
if (f_stat(emu_path, NULL) == FR_NO_FILE)
break;
}
base_len = strlen(emu_path);
@@ -534,7 +534,7 @@ static void _migrate_sd_backup_file_based()
bool multipart = false;
s_printf(backup_file_path, "%s/rawnand.bin", backup_path);
if(f_stat(backup_file_path, NULL))
if (f_stat(backup_file_path, NULL))
multipart = true;
if (!multipart)
@@ -820,19 +820,19 @@ static lv_res_t _create_mbox_emummc_migrate(lv_obj_t *btn)
s_printf(path_buf, "%c%c%c%c%s", 's', 'x', 'o','s', "/emunand/boot0.bin");
if(!f_stat(path_buf, NULL))
if (!f_stat(path_buf, NULL))
em_file = true;
emmcsn_path_impl(path_buf, "", "BOOT0", &emmc_storage);
if(!f_stat(path_buf, NULL))
if (!f_stat(path_buf, NULL))
backup = true;
emmcsn_path_impl(path_buf, "", "rawnand.bin", &emmc_storage);
if(!f_stat(path_buf, NULL))
if (!f_stat(path_buf, NULL))
rawnand_backup = true;
emmcsn_path_impl(path_buf, "", "rawnand.bin.00", &emmc_storage);
if(!f_stat(path_buf, NULL))
if (!f_stat(path_buf, NULL))
rawnand_backup = true;
backup = backup && rawnand_backup;
@@ -983,7 +983,7 @@ static lv_res_t _create_change_emummc_window(lv_obj_t *btn_caller)
{
s_printf(path, "emuMMC/%s/raw_based", &emummc_img->dirlist[emummc_idx * 256]);
if(!f_stat(path, NULL))
if (!f_stat(path, NULL))
{
f_open(&fp, path, FA_READ);
u32 curr_list_sector = 0;
@@ -1024,7 +1024,7 @@ static lv_res_t _create_change_emummc_window(lv_obj_t *btn_caller)
{
s_printf(path, "emuMMC/%s/file_based", &emummc_img->dirlist[emummc_idx * 256]);
if(!f_stat(path, NULL))
if (!f_stat(path, NULL))
{
char *tmp = &emummc_img->dirlist[emummc_idx * 256];
memcpy(&emummc_img->dirlist[file_based_idx * 256], tmp, strlen(tmp) + 1);

View File

@@ -449,17 +449,17 @@ void gfx_hexdump(u32 base, const void *buf, u32 len)
u8 prevFontSize = gfx_con.fntsz;
gfx_con.fntsz = 8;
for(u32 i = 0; i < len; i++)
for (u32 i = 0; i < len; i++)
{
if(i % 0x10 == 0)
if (i % 0x10 == 0)
{
if(i != 0)
if (i != 0)
{
gfx_puts("| ");
for(u32 j = 0; j < 0x10; j++)
for (u32 j = 0; j < 0x10; j++)
{
u8 c = buff[i - 0x10 + j];
if(c >= 32 && c <= 126)
if (c >= 32 && c <= 126)
gfx_putc(c);
else
gfx_putc('.');
@@ -480,10 +480,10 @@ void gfx_hexdump(u32 base, const void *buf, u32 len)
gfx_puts(" ");
}
gfx_puts("| ");
for(u32 j = 0; j < (ln ? k : k + 1); j++)
for (u32 j = 0; j < (ln ? k : k + 1); j++)
{
u8 c = buff[i - k + j];
if(c >= 32 && c <= 126)
if (c >= 32 && c <= 126)
gfx_putc(c);
else
gfx_putc('.');

View File

@@ -30,10 +30,6 @@
#include "frontend/fe_emmc_tools.h"
#include "frontend/gui.h"
#ifdef MENU_LOGO_ENABLE
u8 *Kc_MENU_LOGO;
#endif //MENU_LOGO_ENABLE
nyx_config n_cfg;
hekate_config h_cfg;
@@ -121,7 +117,7 @@ void reloc_patcher(u32 payload_dst, u32 payload_src, u32 payload_size)
if (payload_size == 0x7000)
{
memcpy((u8 *)(payload_src + ALIGN(PATCHED_RELOC_SZ, 0x10)), coreboot_addr, 0x7000); //Bootblock
memcpy((u8 *)(payload_src + ALIGN(PATCHED_RELOC_SZ, 0x10)), coreboot_addr, 0x7000); // Bootblock.
*(vu32 *)CBFS_DRAM_EN_ADDR = CBFS_DRAM_MAGIC;
}
}
@@ -433,12 +429,13 @@ void nyx_init_load_res()
void ipl_main()
{
// Tegra/Horizon configuration goes to 0x80000000+, package2 goes to 0xA9800000, we place our heap in between.
// Set heap address.
heap_init((void *)IPL_HEAP_START);
b_cfg = (boot_cfg_t *)(nyx_str->hekate + 0x94);
#ifdef DEBUG_UART_PORT
// Enable the selected uart debug port.
#if (DEBUG_UART_PORT == UART_B)
gpio_config(GPIO_PORT_G, GPIO_PIN_0, GPIO_MODE_SPIO);
#elif (DEBUG_UART_PORT == UART_C)
@@ -453,9 +450,10 @@ void ipl_main()
uart_wait_xfer(DEBUG_UART_PORT, UART_TX_IDLE);
#endif
// Initialize the rest of hw and load nyx's resources.
// Initialize the rest of hw and load Nyx resources.
nyx_init_load_res();
// Initialize Nyx GUI and show it.
nyx_load_and_run();
// Halt BPMP if we managed to get out of execution.