| 167 | } |
| 168 | |
| 169 | static void HandleErrorOutput(const std::string& err) { |
| 170 | // Drawing directly on the screen because message_overlay is not visible |
| 171 | // when faded out |
| 172 | BitmapRef surface = DisplayUi->GetDisplaySurface(); |
| 173 | surface->FillRect(surface->GetRect(), Color(255, 0, 0, 128)); |
| 174 | |
| 175 | std::string error = err + "\nPress [ENTER] key to exit..."; |
| 176 | |
| 177 | Text::Draw(*surface, 11, 11, *Font::DefaultBitmapFont(), Color(0, 0, 0, 255), error); |
| 178 | Text::Draw(*surface, 10, 10, *Font::DefaultBitmapFont(), Color(255, 255, 255, 255), error); |
| 179 | DisplayUi->UpdateDisplay(); |
| 180 | |
| 181 | if (ignore_pause) { return; } |
| 182 | |
| 183 | Input::ResetKeys(); |
| 184 | while (!Input::IsAnyPressed()) { |
| 185 | #if !defined(USE_LIBRETRO) |
| 186 | Game_Clock::SleepFor(1ms); |
| 187 | #endif |
| 188 | if (!DisplayUi->ProcessEvents() || Player::exit_flag) { |
| 189 | break; |
| 190 | } |
| 191 | |
| 192 | Input::Update(); |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | void Output::Quit() { |
| 197 | Game_Config::CloseLogFile(); |
no test coverage detected