Simplify SDL message boxes (#1249)
It has what we needs and needs less abstraction, overall simplifying the code
This commit is contained in:
parent
902539b97a
commit
b584f1fe35
|
@ -500,19 +500,8 @@ static int f_show_fatal_error(lua_State *L) {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
MessageBox(0, msg, title, MB_OK | MB_ICONERROR);
|
MessageBox(0, msg, title, MB_OK | MB_ICONERROR);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
SDL_MessageBoxButtonData buttons[] = {
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, msg, NULL);
|
||||||
{ SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, 0, "Ok" },
|
|
||||||
};
|
|
||||||
SDL_MessageBoxData data = {
|
|
||||||
.title = title,
|
|
||||||
.message = msg,
|
|
||||||
.numbuttons = 1,
|
|
||||||
.buttons = buttons,
|
|
||||||
};
|
|
||||||
int buttonid;
|
|
||||||
SDL_ShowMessageBox(&data, &buttonid);
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue