From 674fa9d9bf61b6f6f4cf5dab6d93e545b2b05ac5 Mon Sep 17 00:00:00 2001 From: ZetaDesigns Date: Wed, 6 Sep 2017 17:49:10 +0200 Subject: [PATCH] add "downloading" text to qrcode scanning i know it's not the prettiest idea to put it in draw_theme_install, but it seemed like the most fitting, and i didnt want to create another function for it --- include/common.h | 5 +++-- source/camera.c | 2 +- source/draw.c | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/common.h b/include/common.h index 79f284d..aa78e18 100644 --- a/include/common.h +++ b/include/common.h @@ -40,9 +40,10 @@ #define SHUFFLE_INSTALL 1 #define BGM_INSTALL 2 #define UNINSTALL 3 +#define DOWNLOADING 3 -#define ERROR 0 -#define WARNING 1 +#define ERROR 0 +#define WARNING 1 static const int THEMES_PER_SCREEN = 4; enum TextureID { diff --git a/source/camera.c b/source/camera.c index 57ebff9..833bc2c 100644 --- a/source/camera.c +++ b/source/camera.c @@ -96,7 +96,7 @@ Result http_get(char *url, char *path) ret = httpcSetKeepAlive(&context, HTTPC_KEEPALIVE_ENABLED); ret = httpcAddRequestHeaderField(&context, "User-Agent", "Anemone3DS/1.1.0"); ret = httpcAddRequestHeaderField(&context, "Connection", "Keep-Alive"); - + draw_theme_install(DOWNLOADING); ret = httpcBeginRequest(&context); if (ret != 0) { diff --git a/source/draw.c b/source/draw.c index a1a95e0..a15e326 100644 --- a/source/draw.c +++ b/source/draw.c @@ -170,6 +170,9 @@ void draw_theme_install(int install_type) case 2: pp2d_draw_text_center(GFX_TOP, 120, 0.8, 0.8, COLOR_WHITE, "Installing BGM..."); break; + case 3: + pp2d_draw_text_center(GFX_TOP, 120, 0.8, 0.8, COLOR_WHITE, "Downloading..."); + break; default: break; }