Skip to content

Commit

Permalink
Launcher: Reduce idle redraw frequency
Browse files Browse the repository at this point in the history
Idle redraw is mainly to update the clock/battery/wifi icons.

From 100ms to 1000ms.
  • Loading branch information
ducalex committed Nov 3, 2024
1 parent 1cfa1e5 commit a1d5d9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions THEMING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Colors are RGB565 and can be represented as integers or hex strings. The special
"item_message": "0xBDF7"
},
"launcher_1": {
"__comment": "This section contains launcher theme variant 1",
"__comment": "This section contains launcher colors variant 1",
"background": "0x0000",
"foreground": "0xFFDE",
"list_standard_bg": "transparent",
Expand All @@ -47,7 +47,7 @@ Colors are RGB565 and can be represented as integers or hex strings. The special
"list_selected_fg": "0xFFFF"
},
"launcher_2": {
"__comment": "This section contains launcher theme variant 2",
"__comment": "This section contains launcher colors variant 2",
"background": "0x0000",
"foreground": "0xFFDE",
"list_standard_bg": "transparent",
Expand All @@ -56,7 +56,7 @@ Colors are RGB565 and can be represented as integers or hex strings. The special
"list_selected_fg": "0xFFFF"
},
"launcher_3": {
"__comment": "This section contains launcher theme variant 3",
"__comment": "This section contains launcher colors variant 3",
"background": "0x0000",
"foreground": "0xFFDE",
"list_standard_bg": "transparent",
Expand All @@ -65,7 +65,7 @@ Colors are RGB565 and can be represented as integers or hex strings. The special
"list_selected_fg": "0x0000"
},
"launcher_4": {
"__comment": "This section contains launcher theme variant 4",
"__comment": "This section contains launcher colors variant 4",
"background": "0x0000",
"foreground": "0xFFDE",
"list_standard_bg": "transparent",
Expand Down
2 changes: 1 addition & 1 deletion launcher/main/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ void gui_draw_list(tab_t *tab)
{
char buffer[64];
snprintf(buffer, 63, "[%s]", tab->navpath);
top += rg_gui_draw_text(0, top, gui.width, buffer, fg[0], bg[0], 0).height;
top += rg_gui_draw_text(0, top, gui.width, buffer, gui.theme->foreground, C_TRANSPARENT, 0).height;
}

top += ((gui.height - top) - (lines * line_height)) / 2;
Expand Down
3 changes: 2 additions & 1 deletion launcher/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ static void retro_loop(void)
prev_joystick = 0;
gui_event(TAB_IDLE, tab);
next_idle_event = rg_system_timer() + 100000;
redraw_pending = true;
if (gui.idle_counter % 10 == 1)
redraw_pending = true;
}
else if (gui.idle_counter)
{
Expand Down

0 comments on commit a1d5d9e

Please sign in to comment.