From f94c7f605a8eff955c50f6c5cd4ba827d12ed4fa Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Sun, 28 Aug 2016 05:07:13 -0400 Subject: [PATCH] Use accessors (subfolders) --- source/firm/firm.c | 2 +- source/std/draw.c | 10 +++++----- source/std/fs.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/firm/firm.c b/source/firm/firm.c index 1a6d916..a1e029a 100644 --- a/source/firm/firm.c +++ b/source/firm/firm.c @@ -568,7 +568,7 @@ boot_cfw() if (patch_firm_all() != 0) return; - if (config->options[OPTION_REBOOT]) { + if (get_opt_raw(OPTION_REBOOT)) { fprintf(stderr, "Saving FIRM for reboot...\n"); if (!write_file(firm_loc, PATH_NATIVE_P, firm_size)) abort("Failed to save prepatched native\n"); diff --git a/source/std/draw.c b/source/std/draw.c index 83622c3..42313d9 100644 --- a/source/std/draw.c +++ b/source/std/draw.c @@ -209,7 +209,7 @@ void set_font(const char* filename) { } void dump_log(unsigned int force) { - if(!config->options[OPTION_SAVE_LOGS]) + if(!get_opt_raw(OPTION_SAVE_LOGS)) return; if (force == 0 && log_size < LOG_BUFFER_SIZE-1) @@ -241,7 +241,7 @@ clear_disp(uint8_t *screen) screen[j + 1] = top_bg[i]; screen[j + 2] = top_bg[i + 1]; screen[j + 3] = top_bg[i + 2]; - if (!kill_output && config->options[OPTION_DIM_MODE]) { + if (!kill_output && get_opt_raw(OPTION_DIM_MODE)) { screen[j + 1] = alphamap[screen[j + 1]]; screen[j + 2] = alphamap[screen[j + 2]]; screen[j + 3] = alphamap[screen[j + 3]]; @@ -256,7 +256,7 @@ clear_disp(uint8_t *screen) screen[j + 1] = bottom_bg[i]; screen[j + 2] = bottom_bg[i + 1]; screen[j + 3] = bottom_bg[i + 2]; - if (!kill_output && config->options[OPTION_DIM_MODE]) { + if (!kill_output && get_opt_raw(OPTION_DIM_MODE)) { screen[j + 1] = alphamap[screen[j + 1]]; screen[j + 2] = alphamap[screen[j + 2]]; screen[j + 3] = alphamap[screen[j + 3]]; @@ -327,7 +327,7 @@ draw_character(uint8_t *screen, const unsigned int character, unsigned int ch_x, screen[pos + 1] = buffer_bg[pos_b]; screen[pos + 2] = buffer_bg[pos_b + 1]; screen[pos + 3] = buffer_bg[pos_b + 2]; - if (config->options[OPTION_DIM_MODE]) { + if (get_opt_raw(OPTION_DIM_MODE)) { screen[pos + 1] = alphamap[screen[pos + 1]]; screen[pos + 2] = alphamap[screen[pos + 2]]; screen[pos + 3] = alphamap[screen[pos + 3]]; @@ -343,7 +343,7 @@ draw_character(uint8_t *screen, const unsigned int character, unsigned int ch_x, screen[pos + 1] = buffer_bg[pos_b]; screen[pos + 2] = buffer_bg[pos_b + 1]; screen[pos + 3] = buffer_bg[pos_b + 2]; - if (config->options[OPTION_DIM_MODE]) { + if (get_opt_raw(OPTION_DIM_MODE)) { screen[pos + 1] = alphamap[screen[pos + 1]]; screen[pos + 2] = alphamap[screen[pos + 2]]; screen[pos + 3] = alphamap[screen[pos + 3]]; diff --git a/source/std/fs.c b/source/std/fs.c index 1ab7f54..ef1d529 100644 --- a/source/std/fs.c +++ b/source/std/fs.c @@ -86,7 +86,7 @@ fumount(void) if (f_mount(NULL, "SD:", 1)) return 1; - config->options[OPTION_SAVE_LOGS] = 0; // FS unmounted, can't log anymore + set_opt_raw(OPTION_SAVE_LOGS, 0); // FS unmounted, can't log anymore return 0; } -- 2.39.5