Fixed rsf and reboot
This commit is contained in:
@@ -154,6 +154,8 @@ AccessControlInfo:
|
||||
- csnd:SND
|
||||
- am:u
|
||||
- ns:s
|
||||
- ptm:sysm
|
||||
- mcu::HWC
|
||||
|
||||
SystemControlInfo:
|
||||
Dependency:
|
||||
|
||||
@@ -32,6 +32,7 @@ int init_services(void)
|
||||
{
|
||||
cfguInit();
|
||||
open_archives();
|
||||
ptmSysmInit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -52,6 +53,7 @@ int main(void)
|
||||
Result res = get_themes(&themes_list, &theme_count);
|
||||
|
||||
int selected_theme = 0;
|
||||
int shuffle_theme_count = 0;
|
||||
bool preview_mode = false;
|
||||
|
||||
while(aptMainLoop())
|
||||
@@ -61,8 +63,6 @@ int main(void)
|
||||
|
||||
draw_interface(themes_list, theme_count, selected_theme, preview_mode);
|
||||
|
||||
if (kDown & KEY_START)
|
||||
break; //quit
|
||||
|
||||
if (themes_list == NULL)
|
||||
continue;
|
||||
@@ -93,13 +93,26 @@ int main(void)
|
||||
{
|
||||
single_install(*current_theme);
|
||||
}
|
||||
|
||||
else if (kDown & KEY_B)
|
||||
{
|
||||
current_theme->in_shuffle = !(current_theme->in_shuffle);
|
||||
if (shuffle_theme_count < 10)
|
||||
{
|
||||
if (current_theme->in_shuffle) shuffle_theme_count--;
|
||||
else shuffle_theme_count++;
|
||||
current_theme->in_shuffle = !(current_theme->in_shuffle);
|
||||
} else {
|
||||
if (current_theme->in_shuffle) {
|
||||
shuffle_theme_count--;
|
||||
current_theme->in_shuffle = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (kDown & KEY_SELECT)
|
||||
{
|
||||
shuffle_install(themes_list, theme_count);
|
||||
if (shuffle_theme_count > 0)
|
||||
shuffle_install(themes_list, theme_count);
|
||||
}
|
||||
|
||||
// Movement in the UI
|
||||
@@ -124,16 +137,17 @@ int main(void)
|
||||
{
|
||||
selected_theme = theme_count-1;
|
||||
}
|
||||
|
||||
if (kDown & KEY_START)
|
||||
{
|
||||
exit_screens();
|
||||
exit_services();
|
||||
PTMSYSM_RebootAsync(0);
|
||||
ptmSysmExit();
|
||||
}
|
||||
}
|
||||
|
||||
free(themes_list);
|
||||
|
||||
exit_screens();
|
||||
exit_services();
|
||||
|
||||
ptmSysmInit();
|
||||
PTMSYSM_ShutdownAsync(0);
|
||||
ptmSysmExit();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,8 @@ Result get_themes(Theme_s **themes_list, int *theme_count)
|
||||
|
||||
ssize_t textureID = MAX_TEXTURE + (*theme_count * 2);
|
||||
parse_smdh(current_theme, theme_path, textureID);
|
||||
load_preview(current_theme, theme_path, textureID+1);
|
||||
current_theme->has_preview = false;
|
||||
// load_preview(current_theme, theme_path, textureID+1);
|
||||
}
|
||||
|
||||
FSDIR_Close(dir_handle);
|
||||
|
||||
Reference in New Issue
Block a user