MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / SDL_ShowSimpleMessageBox

Function SDL_ShowSimpleMessageBox

Source/platform/ctr/messagebox.cpp:7–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "utils/str_cat.hpp"
6
7int 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}

Callers 1

UiOkDialogFunction · 0.50

Calls 2

SDL_LogFunction · 0.85
StrCatFunction · 0.85

Tested by

no test coverage detected