SDL_VideoInit to SDL_InitVideo

- Refers to SDL3 internal function, NOT SDL2 public function
- FIXME comment is removed as naming convention is established
This commit is contained in:
Christmas-Missionary
2026-08-15 04:00:25 +00:00
committed by Ryan C. Gordon
parent b669ac244e
commit 19758eb15d
5 changed files with 6 additions and 7 deletions

View File

@@ -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);

View File

@@ -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()) {

View File

@@ -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;

View File

@@ -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.
*/

View File

@@ -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();