Draw no home icon in theme plaza browser

This commit is contained in:
2024-04-24 23:37:13 -04:00
parent ecf9dc63ce
commit b19343e238
2 changed files with 19 additions and 4 deletions

View File

@@ -40,8 +40,8 @@ bool dspfirm = false;
static audio_s * audio = NULL;
static bool homebrew = false;
static bool installed_themes = false;
static bool home_displayed = false;
static u64 time_home_pressed = 0;
bool home_displayed = false;
u64 time_home_pressed = 0;
static Thread iconLoadingThread = {0};
static Thread_Arg_s iconLoadingThread_arg = {0};

View File

@@ -501,12 +501,20 @@ bool themeplaza_browser(EntryMode mode)
C2D_Image preview = { 0 };
bool extra_mode = false;
extern u64 time_home_pressed;
extern bool home_displayed;
while (aptMainLoop() && !quit)
{
if (current_list->entries == NULL)
break;
if (aptCheckHomePressRejected() && !home_displayed)
{
time_home_pressed = svcGetSystemTick() / CPU_TICKS_PER_MSEC;
home_displayed = true;
}
if (preview_mode)
{
draw_preview(preview, preview_offset);
@@ -518,6 +526,13 @@ bool themeplaza_browser(EntryMode mode)
instructions = extra_instructions;
draw_grid_interface(current_list, instructions);
}
if (home_displayed)
{
u64 cur_time = svcGetSystemTick() / CPU_TICKS_PER_MSEC;
draw_home(time_home_pressed, cur_time);
if (cur_time - time_home_pressed > 2000) home_displayed = false;
}
end_frame();
hidScanInput();