/*
- Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
#include <stdio.h>
#include <stdlib.h>
-#include <signal.h>
#include "SDL.h"
exit(rc);
}
-static int
+static int SDLCALL
button_messagebox(void *eventNumber)
{
const SDL_MessageBoxButtonData buttons[] = {
"Custom MessageBox",
"This is a custom messagebox",
2,
- buttons,
+ NULL,/* buttons */
NULL /* Default color scheme */
};
int button = -1;
int success = 0;
+ data.buttons = buttons;
if (eventNumber) {
data.message = "This is a custom messagebox from a background thread.";
}
quit(1);
}
+ success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
+ NULL,
+ "NULL Title",
+ NULL);
+ if (success == -1) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
+ quit(1);
+ }
+
+ success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
+ "NULL Message",
+ NULL,
+ NULL);
+ if (success == -1) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
+ quit(1);
+ }
+
/* Google says this is Traditional Chinese for "beef with broccoli" */
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"UTF-8 Simple MessageBox",