Browse Source

SDL_VideoInit to SDL_InitVideo

- Refers to SDL3 internal function, NOT SDL2 public function
- FIXME comment is removed as naming convention is established
Christmas-Missionary 1 month ago
parent
commit
19758eb15d
5 changed files with 6 additions and 7 deletions
  1. 1 1
      src/SDL.c
  2. 0 1
      src/audio/SDL_audio.c
  3. 1 1
      src/video/SDL_video.c
  4. 3 3
      src/video/SDL_video_c.h
  5. 1 1
      src/video/cocoa/SDL_cocoavideo.m

+ 1 - 1
src/SDL.c

@@ -420,7 +420,7 @@ bool SDL_InitSubSystem(SDL_InitFlags flags)
             SDL_assert(SDL_VideoThreadID == SDL_MainThreadID);
 #endif
 
-            if (!SDL_VideoInit(NULL)) {
+            if (!SDL_InitVideo(NULL)) {
                 SDL_DecrementSubsystemRefCount(SDL_INIT_VIDEO);
                 SDL_PushError();
                 SDL_QuitSubSystem(SDL_INIT_EVENTS);

+ 0 - 1
src/audio/SDL_audio.c

@@ -949,7 +949,6 @@ static Uint32 SDLCALL HashAudioDeviceID(void *userdata, const void *key)
     return ((Uint32) ((uintptr_t) key)) >> 2;
 }
 
-// !!! FIXME: the video subsystem does SDL_VideoInit, not SDL_InitVideo. Make this match.
 bool SDL_InitAudio(const char *driver_name)
 {
     if (SDL_GetCurrentAudioDriver()) {

+ 1 - 1
src/video/SDL_video.c

@@ -616,7 +616,7 @@ const char *SDL_GetVideoDriver(int index)
 /*
  * Initialize the video and event subsystems -- determine native pixel format
  */
-bool SDL_VideoInit(const char *driver_name)
+bool SDL_InitVideo(const char *driver_name)
 {
     SDL_VideoDevice *video;
     bool init_events = false;

+ 3 - 3
src/video/SDL_video_c.h

@@ -37,7 +37,7 @@ struct SDL_VideoDevice;
  * either SDL_Init() or SDL_InitSubSystem(), you should call SDL_VideoQuit()
  * before calling SDL_Quit().
  *
- * It is safe to call this function multiple times. SDL_VideoInit() will call
+ * It is safe to call this function multiple times. SDL_InitVideo() will call
  * SDL_VideoQuit() itself if the video subsystem has already been initialized.
  *
  * You can use SDL_GetNumVideoDrivers() and SDL_GetVideoDriver() to find a
@@ -48,10 +48,10 @@ struct SDL_VideoDevice;
  * \returns true on success or false on failure; call
  *          SDL_GetError() for more information.
  */
-extern bool SDL_VideoInit(const char *driver_name);
+extern bool SDL_InitVideo(const char *driver_name);
 
 /**
- * Shut down the video subsystem, if initialized with SDL_VideoInit().
+ * Shut down the video subsystem, if initialized with SDL_InitVideo().
  *
  * This function closes all windows, and restores the original video mode.
  */

+ 1 - 1
src/video/cocoa/SDL_cocoavideo.m

@@ -61,7 +61,7 @@ static SDL_VideoDevice *Cocoa_CreateDevice(void)
         SDL_CocoaVideoData *data;
 
         if (![NSThread isMainThread]) {
-            return NULL;  // this doesn't SDL_SetError() because SDL_VideoInit is just going to overwrite it.
+            return NULL;  // this doesn't SDL_SetError() because SDL_InitVideo is just going to overwrite it.
         }
 
         Cocoa_RegisterApp();