mirror of
https://github.com/love2d/megasource.git
synced 2026-08-19 04:05:09 +02:00
update SDL3 to latest commit
This commit is contained in:
@@ -93,9 +93,6 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Enable standard application logging */
|
||||
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
|
||||
|
||||
/* Parse commandline */
|
||||
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
|
||||
return 1;
|
||||
@@ -105,7 +102,7 @@ int main(int argc, char *argv[])
|
||||
"Simple MessageBox",
|
||||
"This is a simple error MessageBox",
|
||||
NULL);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
@@ -114,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
"Simple MessageBox",
|
||||
"This is a simple MessageBox with a newline:\r\nHello world!",
|
||||
NULL);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
@@ -123,7 +120,7 @@ int main(int argc, char *argv[])
|
||||
NULL,
|
||||
"NULL Title",
|
||||
NULL);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
@@ -132,7 +129,7 @@ int main(int argc, char *argv[])
|
||||
"NULL Message",
|
||||
NULL,
|
||||
NULL);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
@@ -142,7 +139,7 @@ int main(int argc, char *argv[])
|
||||
"UTF-8 Simple MessageBox",
|
||||
"Unicode text: '牛肉西蘭花' ...",
|
||||
NULL);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
@@ -152,7 +149,7 @@ int main(int argc, char *argv[])
|
||||
"UTF-8 Simple MessageBox",
|
||||
"Unicode text and newline:\r\n'牛肉西蘭花'\n'牛肉西蘭花'",
|
||||
NULL);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
@@ -162,7 +159,7 @@ int main(int argc, char *argv[])
|
||||
"牛肉西蘭花",
|
||||
"Unicode text in the title.",
|
||||
NULL);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
@@ -175,7 +172,7 @@ int main(int argc, char *argv[])
|
||||
to work, since the message box events are dispatched by the Cocoa
|
||||
subsystem on the main thread.
|
||||
*/
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
if (!SDL_Init(SDL_INIT_VIDEO)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL video subsystem: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
@@ -204,14 +201,14 @@ int main(int argc, char *argv[])
|
||||
/* On wayland, no window will actually show until something has
|
||||
actually been displayed.
|
||||
*/
|
||||
SDL_Renderer *renderer = SDL_CreateRenderer(window, NULL, 0);
|
||||
SDL_Renderer *renderer = SDL_CreateRenderer(window, NULL);
|
||||
SDL_RenderPresent(renderer);
|
||||
|
||||
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||
"Simple MessageBox",
|
||||
"This is a simple error MessageBox with a parent window. Press a key or close the window after dismissing this messagebox.",
|
||||
window);
|
||||
if (success == -1) {
|
||||
if (!success) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user