mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-26 00:21:39 +00:00
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:
committed by
Ryan C. Gordon
parent
b669ac244e
commit
19758eb15d
@@ -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);
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user