update SDL3 to latest commit

This commit is contained in:
Sasha Szpakowski
2024-10-06 20:30:44 -03:00
parent 1b0fdc338b
commit 9e5eb1b018
1426 changed files with 242456 additions and 103496 deletions
+10 -13
View File
@@ -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);
}