Improved SDL error messages slightly

This commit is contained in:
Dimitris Panokostas 2019-10-11 21:38:30 +02:00
parent e4904d3fb0
commit 034e657d54
2 changed files with 4 additions and 4 deletions

View file

@ -357,7 +357,7 @@ int graphics_setup(void)
800,
480,
sdl_window_mode);
check_error_sdl(sdl_window == nullptr, "Unable to create window");
check_error_sdl(sdl_window == nullptr, "Unable to create window:");
}
if (SDL_GetWindowDisplayMode(sdl_window, &sdlMode) != 0)
@ -377,7 +377,7 @@ int graphics_setup(void)
if (renderer == nullptr)
{
renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
check_error_sdl(renderer == nullptr, "Unable to create a renderer");
check_error_sdl(renderer == nullptr, "Unable to create a renderer:");
}
if (SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1") != SDL_TRUE)

View file

@ -311,7 +311,7 @@ void amiberry_gui_init()
//-------------------------------------------------
if (!gui_screen)
gui_screen = SDL_CreateRGBSurface(0, GUI_WIDTH, GUI_HEIGHT, 16, 0, 0, 0, 0);
check_error_sdl(gui_screen == nullptr, "Unable to create GUI surface");
check_error_sdl(gui_screen == nullptr, "Unable to create GUI surface:");
#ifdef USE_DISPMANX
displayHandle = vc_dispmanx_display_open(0);
@ -395,7 +395,7 @@ void amiberry_gui_init()
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
gui_texture = SDL_CreateTexture(renderer, gui_screen->format->format, SDL_TEXTUREACCESS_STREAMING, gui_screen->w, gui_screen->h);
check_error_sdl(gui_texture == nullptr, "Unable to create GUI texture");
check_error_sdl(gui_texture == nullptr, "Unable to create GUI texture:");
#endif
SDL_RenderSetLogicalSize(renderer, GUI_WIDTH, GUI_HEIGHT);
SDL_ShowCursor(SDL_ENABLE);