mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Merge pull request #289 from twoscomplement/sdl_error_out
Examples: Show SDL error message on init failure.
This commit is contained in:
commit
040e427dad
1 changed files with 3 additions and 0 deletions
|
|
@ -10,7 +10,10 @@ int main(int, char**)
|
|||
{
|
||||
// Setup SDL
|
||||
if (SDL_Init(SDL_INIT_EVERYTHING) != 0)
|
||||
{
|
||||
printf("Error: %s", SDL_GetError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Setup window
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue