]> Chaos Git - corbenik/corbenik.git/commitdiff
Use accessors (subfolders)
authorchaoskagami <chaos.kagami@gmail.com>
Sun, 28 Aug 2016 09:07:13 +0000 (05:07 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Sun, 28 Aug 2016 09:07:13 +0000 (05:07 -0400)
source/firm/firm.c
source/std/draw.c
source/std/fs.c

index 1a6d9165d41f84b6c92f906d36b08135fa29709c..a1e029a1fcc31d2140c1cffad2a8aa4a5b4015b8 100644 (file)
@@ -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");
index 83622c3b6698ee0b3a0d6b72a1fd243ceda43927..42313d9577ca4380ead93d8d54bd9b2f78afd082 100644 (file)
@@ -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]];
index 1ab7f54657fd3fbece0b0e9b15acf0dd145edff6..ef1d529f49e8ac712579d3ead4f074bb90075545 100644 (file)
@@ -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;
 }