Use SDL_MessageBoxFlags and SDL_MessageBoxButtonFlags appropriately

This commit is contained in:
Sam Lantinga
2024-05-07 13:23:55 -07:00
parent 748490677c
commit 991d28ae37
5 changed files with 13 additions and 24 deletions

View File

@@ -166,7 +166,7 @@ int Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *button
* We need to handle it gracefully, otherwise no message box will be shown.
*/
argv[argc++] = zenity_major > 3 || (zenity_major == 3 && zenity_minor >= 90) ? "--icon" : "--icon-name";
switch (messageboxdata->flags) {
switch (messageboxdata->flags & (SDL_MESSAGEBOX_ERROR | SDL_MESSAGEBOX_WARNING | SDL_MESSAGEBOX_INFORMATION)) {
case SDL_MESSAGEBOX_ERROR:
argv[argc++] = "dialog-error";
break;