X11 messageboxes should treat "\r\n" as "\n" by ignoring the '\r' char.

--HG--
extra : rebase_source : 0054e96755f753555237f3d7dd64f1dfa1a1e56c
This commit is contained in:
Ryan C. Gordon 2012-12-16 14:39:49 -05:00
parent adefd543ce
commit c2ec53f4fa
2 changed files with 23 additions and 0 deletions

View file

@ -49,6 +49,15 @@ main(int argc, char *argv[])
quit(1);
}
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"Simple MessageBox",
"This is a simple MessageBox with a newline:\r\nHello world!",
NULL);
if (success == -1) {
printf("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",
@ -59,6 +68,16 @@ main(int argc, char *argv[])
quit(1);
}
/* Google says this is Traditional Chinese for "beef with broccoli" */
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"UTF-8 Simple MessageBox",
"Unicode text and newline:\r\n'牛肉西蘭花'\n'牛肉西蘭花'",
NULL);
if (success == -1) {
printf("Error Presenting MessageBox: %s\n", SDL_GetError());
quit(1);
}
{
const SDL_MessageBoxButtonData buttons[] = {
{