Qr stuff (#32)
QRs are now scanned and decoded, but they aren't downloaded.
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include "splashes.h"
|
||||
#include "draw.h"
|
||||
#include "common.h"
|
||||
#include "camera.h"
|
||||
#include <time.h>
|
||||
|
||||
int init_services(void)
|
||||
{
|
||||
@@ -60,8 +62,10 @@ int exit_services(void)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
srand(time(NULL));
|
||||
bool homebrew = init_services();
|
||||
init_screens();
|
||||
init_qr();
|
||||
|
||||
int theme_count = 0;
|
||||
Theme_s * themes_list = NULL;
|
||||
@@ -94,8 +98,15 @@ int main(void)
|
||||
hidScanInput();
|
||||
u32 kDown = hidKeysDown();
|
||||
|
||||
if (!splash_mode) draw_theme_interface(themes_list, theme_count, selected_theme, preview_mode);
|
||||
else draw_splash_interface(splashes_list, splash_count, selected_splash, preview_mode);
|
||||
if (qr_mode)
|
||||
{
|
||||
draw_qr();
|
||||
} else if (!splash_mode)
|
||||
{
|
||||
draw_theme_interface(themes_list, theme_count, selected_theme, preview_mode);
|
||||
} else {
|
||||
draw_splash_interface(splashes_list, splash_count, selected_splash, preview_mode);
|
||||
}
|
||||
|
||||
if (kDown & KEY_START)
|
||||
{
|
||||
@@ -108,6 +119,10 @@ int main(void)
|
||||
else if (kDown & KEY_L)
|
||||
{
|
||||
splash_mode = !splash_mode;
|
||||
} else if (kDown & KEY_R)
|
||||
{
|
||||
qr_mode = !qr_mode;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (themes_list == NULL && !splash_mode)
|
||||
|
||||
Reference in New Issue
Block a user