@@ -109,6 +109,12 @@ void Gui::Update(playbackInfo_t* playbackInfo)
109109 C3D_FrameEnd (0 );
110110 C2D_TextBufClear (g_dynamicBuf);
111111
112+ if (Error::IsQuered ()) {
113+ if (kDown )
114+ Error::Remove ();
115+ return ;
116+ }
117+
112118 touchPosition touch;
113119 hidTouchRead (&touch);
114120 menus.top ()->doUpdate (&touch);
@@ -147,21 +153,21 @@ C2D_Text Gui::StaticTextGen(std::string str) {
147153 return tmpStaticText;
148154}
149155
150- void Gui::PrintColor (const char * text, float xloc, float yloc, float scaleX, float scaleY, u32 color)
156+ void Gui::PrintColor (const std::string& text, float xloc, float yloc, float scaleX, float scaleY, u32 color)
151157{
152158 // Clear the dynamic text buffer
153159 C2D_TextBufClear (g_dynamicBuf);
154160
155161 // Generate and draw dynamic text
156162 C2D_Text dynText;
157- C2D_TextParse (&dynText, g_dynamicBuf, text);
163+ C2D_TextParse (&dynText, g_dynamicBuf, text. c_str () );
158164 C2D_TextOptimize (&dynText);
159165 C2D_DrawText (&dynText, C2D_WithColor, xloc, yloc, 0 .5f , scaleX, scaleY, color);
160166}
161167
162168void Gui::Print (const std::string& text, float xloc, float yloc, float scaleX, float scaleY)
163169{
164- Gui::PrintColor (text. c_str () , xloc, yloc, scaleX, scaleY, 0xFFFFFFFF );
170+ Gui::PrintColor (text, xloc, yloc, scaleX, scaleY, 0xFFFFFFFF );
165171}
166172
167173void Gui::PrintStatic (const std::string &ident, float xloc, float yloc, float scaleX, float scaleY)
@@ -259,6 +265,7 @@ void Gui::DrawError(void) {
259265 else if (errorcode == DECODER_INIT_FAIL ){
260266 Gui::Print (" ERR: Failed to initalize decoder." , 20 .0f , 40 .0f , 0 .5f , 0 .5f );
261267 }
268+ else if (errorcode == ERRORH_GENERIC );
262269 else {
263270 char errstr[30 ];
264271 snprintf (errstr, 30 , " ERR: Undefined error." );
0 commit comments