Browse Source

docs: SDL_INIT_EVERYTHING does not exist anymore

Anonymous Maarten 1 year ago
parent
commit
58e6eacf97
1 changed files with 6 additions and 1 deletions
  1. 6 1
      docs/README-cmake.md

+ 6 - 1
docs/README-cmake.md

@@ -275,9 +275,13 @@ file(WRITE main.c [===========================================[
 /* START of source modifications */
 
 #include <SDL3/SDL.h>
+#include <SDL3/SDL_main.h>
 
 int main(int argc, char *argv[]) {
-    if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
+    (void)argc;
+    (void)argv;
+
+    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
         SDL_Log("SDL_Init failed (%s)", SDL_GetError());
         return 1;
     }
@@ -314,6 +318,7 @@ int main(int argc, char *argv[]) {
     SDL_DestroyWindow(window);
 
     SDL_Quit();
+    return 0;
 }
 
 /* END of source modifications */