summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 03ef049ae..6fff30a25 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -33,6 +33,12 @@
#include "minui/minui.h"
#include "screen_ui.h"
#include "ui.h"
+extern "C" {
+#include "minuitwrp/minui.h"
+int twgr_text(int x, int y, const char *s);
+#include "gui/gui.h"
+}
+#include "data.hpp"
static int char_width;
static int char_height;
@@ -269,7 +275,7 @@ void ScreenRecoveryUI::update_screen_locked()
// Updates only the progress bar, if possible, otherwise redraws the screen.
// Should only be called with updateMutex locked.
void ScreenRecoveryUI::update_progress_locked()
-{
+{return;
if (show_text || !pagesIdentical) {
draw_screen_locked(); // Must redraw the whole screen
pagesIdentical = true;
@@ -432,6 +438,9 @@ void ScreenRecoveryUI::SetProgressType(ProgressType type)
void ScreenRecoveryUI::ShowProgress(float portion, float seconds)
{
+ DataManager::SetValue("ui_progress_portion", (float)(portion * 100.0));
+ DataManager::SetValue("ui_progress_frames", seconds * 30);
+
pthread_mutex_lock(&updateMutex);
progressBarType = DETERMINATE;
progressScopeStart += progressScopeSize;
@@ -445,6 +454,8 @@ void ScreenRecoveryUI::ShowProgress(float portion, float seconds)
void ScreenRecoveryUI::SetProgress(float fraction)
{
+ DataManager::SetValue("ui_progress", (float) (fraction * 100.0)); return;
+
pthread_mutex_lock(&updateMutex);
if (fraction < 0.0) fraction = 0.0;
if (fraction > 1.0) fraction = 1.0;
@@ -475,6 +486,9 @@ void ScreenRecoveryUI::Print(const char *fmt, ...)
vsnprintf(buf, 256, fmt, ap);
va_end(ap);
+ gui_print("%s", buf);
+ return;
+
fputs(buf, stdout);
// This can get called before ui_init(), so be careful.