| 5 | #include "utils/str_cat.hpp" |
| 6 | |
| 7 | int SDL_ShowSimpleMessageBox(Uint32 flags, |
| 8 | const char *title, |
| 9 | const char *message, |
| 10 | SDL_Surface *window) |
| 11 | { |
| 12 | if (SDL_ShowCursor(SDL_DISABLE) <= -1) |
| 13 | SDL_Log("%s", SDL_GetError()); |
| 14 | |
| 15 | bool init = !gspHasGpuRight(); |
| 16 | auto text = devilution::StrCat(title, "\n\n", message); |
| 17 | |
| 18 | if (init) |
| 19 | gfxInitDefault(); |
| 20 | |
| 21 | errorConf error; |
| 22 | errorInit(&error, ERROR_TEXT, CFG_LANGUAGE_EN); |
| 23 | errorText(&error, text.c_str()); |
| 24 | errorDisp(&error); |
| 25 | |
| 26 | if (init) |
| 27 | gfxExit(); |
| 28 | |
| 29 | return 0; |
| 30 | } |
no test coverage detected