Backends: Use "SDL" instead of "SDL2" to match documentation vocabulary
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
5ed34e73d4
commit
92d565692a
4 changed files with 10 additions and 10 deletions
|
@ -72,7 +72,7 @@ BOOL AudioBackend_Init(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Backend_PrintInfo("Available SDL2 audio drivers:");
|
Backend_PrintInfo("Available SDL audio drivers:");
|
||||||
|
|
||||||
for (int i = 0; i < SDL_GetNumAudioDrivers(); ++i)
|
for (int i = 0; i < SDL_GetNumAudioDrivers(); ++i)
|
||||||
Backend_PrintInfo("%s", SDL_GetAudioDriver(i));
|
Backend_PrintInfo("%s", SDL_GetAudioDriver(i));
|
||||||
|
@ -99,7 +99,7 @@ BOOL AudioBackend_Init(void)
|
||||||
|
|
||||||
SDL_PauseAudioDevice(device_id, 0);
|
SDL_PauseAudioDevice(device_id, 0);
|
||||||
|
|
||||||
Backend_PrintInfo("Selected SDL2 audio driver: %s", SDL_GetCurrentAudioDriver());
|
Backend_PrintInfo("Selected SDL audio driver: %s", SDL_GetCurrentAudioDriver());
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ static void GlyphBatch_DestroyTexture(SPRITEBATCH_U64 texture_id, void *udata)
|
||||||
|
|
||||||
RenderBackend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
RenderBackend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
||||||
{
|
{
|
||||||
Backend_PrintInfo("Available SDL2 render drivers:");
|
Backend_PrintInfo("Available SDL render drivers:");
|
||||||
|
|
||||||
for (int i = 0; i < SDL_GetNumRenderDrivers(); ++i)
|
for (int i = 0; i < SDL_GetNumRenderDrivers(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -161,7 +161,7 @@ RenderBackend_Surface* RenderBackend_Init(const char *window_title, int screen_w
|
||||||
if (SDL_GetRendererInfo(renderer, &info) < 0)
|
if (SDL_GetRendererInfo(renderer, &info) < 0)
|
||||||
Backend_PrintError("Couldn't get selected render driver information: %s", SDL_GetError());
|
Backend_PrintError("Couldn't get selected render driver information: %s", SDL_GetError());
|
||||||
else
|
else
|
||||||
Backend_PrintInfo("Selected SDL2 render driver: %s", info.name);
|
Backend_PrintInfo("Selected SDL render driver: %s", info.name);
|
||||||
|
|
||||||
framebuffer.texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA32, SDL_TEXTUREACCESS_TARGET, screen_width, screen_height);
|
framebuffer.texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA32, SDL_TEXTUREACCESS_TARGET, screen_width, screen_height);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ BOOL ControllerBackend_Init(void)
|
||||||
{
|
{
|
||||||
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0)
|
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0)
|
||||||
{
|
{
|
||||||
Backend_PrintError("Couldn't initialise joystack SDL2 subsystem: %s", SDL_GetError());
|
Backend_PrintError("Couldn't initialise joystick SDL subsystem: %s", SDL_GetError());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ BOOL Backend_Init(void)
|
||||||
{
|
{
|
||||||
if (SDL_InitSubSystem(SDL_INIT_VIDEO) == 0)
|
if (SDL_InitSubSystem(SDL_INIT_VIDEO) == 0)
|
||||||
{
|
{
|
||||||
Backend_PrintInfo("Available SDL2 video drivers:");
|
Backend_PrintInfo("Available SDL video drivers:");
|
||||||
|
|
||||||
for (int i = 0; i < SDL_GetNumVideoDrivers(); ++i)
|
for (int i = 0; i < SDL_GetNumVideoDrivers(); ++i)
|
||||||
Backend_PrintInfo("%s", SDL_GetVideoDriver(i));
|
Backend_PrintInfo("%s", SDL_GetVideoDriver(i));
|
||||||
|
@ -45,21 +45,21 @@ BOOL Backend_Init(void)
|
||||||
const char *driver = SDL_GetCurrentVideoDriver();
|
const char *driver = SDL_GetCurrentVideoDriver();
|
||||||
|
|
||||||
if (driver != NULL)
|
if (driver != NULL)
|
||||||
Backend_PrintInfo("Selected SDL2 video driver: %s", driver);
|
Backend_PrintInfo("Selected SDL video driver: %s", driver);
|
||||||
else
|
else
|
||||||
Backend_PrintError("No SDL2 video driver initialized !");
|
Backend_PrintError("No SDL video driver initialized !");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string error_message = std::string("Could not initialise SDL2 video subsystem: ") + SDL_GetError();
|
std::string error_message = std::string("Could not initialise SDL video subsystem: ") + SDL_GetError();
|
||||||
Backend_ShowMessageBox("Fatal error", error_message.c_str());
|
Backend_ShowMessageBox("Fatal error", error_message.c_str());
|
||||||
|
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string error_message = std::string("Could not initialise SDL2: ") + SDL_GetError();
|
std::string error_message = std::string("Could not initialise SDL: ") + SDL_GetError();
|
||||||
Backend_ShowMessageBox("Fatal error", error_message.c_str());
|
Backend_ShowMessageBox("Fatal error", error_message.c_str());
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue