Ver código fonte

SDL_VideoQuit to SDL_QuitVideo

- Refers to SDL3 internal function, NOT SDL2 public function
Christmas-Missionary 1 mês atrás
pai
commit
11a9d3212e
3 arquivos alterados com 9 adições e 9 exclusões
  1. 1 1
      src/SDL.c
  2. 5 5
      src/video/SDL_video.c
  3. 3 3
      src/video/SDL_video_c.h

+ 1 - 1
src/SDL.c

@@ -668,7 +668,7 @@ void SDL_QuitSubSystem(SDL_InitFlags flags)
     if (flags & SDL_INIT_VIDEO) {
         if (SDL_ShouldQuitSubsystem(SDL_INIT_VIDEO)) {
             SDL_QuitRender();
-            SDL_VideoQuit();
+            SDL_QuitVideo();
             SDL_VideoThreadID = 0;
             // video implies events
             SDL_QuitSubSystem(SDL_INIT_EVENTS);

+ 5 - 5
src/video/SDL_video.c

@@ -628,7 +628,7 @@ bool SDL_InitVideo(const char *driver_name)
 
     // Check to make sure we don't overwrite '_this'
     if (_this) {
-        SDL_VideoQuit();
+        SDL_QuitVideo();
     }
 
     SDL_InitTicks();
@@ -705,7 +705,7 @@ bool SDL_InitVideo(const char *driver_name)
         goto pre_driver_error;
     }
 
-    /* From this point on, use SDL_VideoQuit to cleanup on error, rather than
+    /* From this point on, use SDL_QuitVideo to cleanup on error, rather than
     pre_driver_error. */
     _this = video;
     _this->name = bootstrap[i]->name;
@@ -718,13 +718,13 @@ bool SDL_InitVideo(const char *driver_name)
 
     // Initialize the video subsystem
     if (!_this->VideoInit(_this)) {
-        SDL_VideoQuit();
+        SDL_QuitVideo();
         return false;
     }
 
     // Make sure some displays were added
     if (_this->num_displays == 0) {
-        SDL_VideoQuit();
+        SDL_QuitVideo();
         return SDL_SetError("The video driver did not add any displays");
     }
 
@@ -4673,7 +4673,7 @@ bool SDL_DisableScreenSaver(void)
     return SDL_Unsupported();
 }
 
-void SDL_VideoQuit(void)
+void SDL_QuitVideo(void)
 {
     int i;
 

+ 3 - 3
src/video/SDL_video_c.h

@@ -34,11 +34,11 @@ struct SDL_VideoDevice;
  * pixel formats, but does not initialize a window or graphics mode.
  *
  * If you use this function and you haven't used the SDL_INIT_VIDEO flag with
- * either SDL_Init() or SDL_InitSubSystem(), you should call SDL_VideoQuit()
+ * either SDL_Init() or SDL_InitSubSystem(), you should call SDL_QuitVideo()
  * before calling SDL_Quit().
  *
  * It is safe to call this function multiple times. SDL_InitVideo() will call
- * SDL_VideoQuit() itself if the video subsystem has already been initialized.
+ * SDL_QuitVideo() itself if the video subsystem has already been initialized.
  *
  * You can use SDL_GetNumVideoDrivers() and SDL_GetVideoDriver() to find a
  * specific `driver_name`.
@@ -55,7 +55,7 @@ extern bool SDL_InitVideo(const char *driver_name);
  *
  * This function closes all windows, and restores the original video mode.
  */
-extern void SDL_VideoQuit(void);
+extern void SDL_QuitVideo(void);
 
 extern bool SDL_SetWindowTextureVSync(struct SDL_VideoDevice *_this, SDL_Window *window, int vsync);