Draw no home icon in theme plaza browser
This commit is contained in:
@@ -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};
|
||||
@@ -382,10 +382,10 @@ int main(void)
|
||||
}
|
||||
|
||||
if (aptCheckHomePressRejected() && !home_displayed)
|
||||
{
|
||||
{
|
||||
time_home_pressed = svcGetSystemTick() / CPU_TICKS_PER_MSEC;
|
||||
home_displayed = true;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CITRA_MODE
|
||||
if(R_FAILED(archive_result) && current_mode == MODE_THEMES)
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user