mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Examples: made examples's main.cpp consistent with returning 1 on error.
This commit is contained in:
parent
940627d008
commit
cee40f8af9
13 changed files with 34 additions and 33 deletions
|
|
@ -33,7 +33,7 @@ int main(int, char**)
|
|||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
|
||||
{
|
||||
printf("Error: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// From 2.0.18: Enable native IME.
|
||||
|
|
@ -48,13 +48,13 @@ int main(int, char**)
|
|||
if (window == nullptr)
|
||||
{
|
||||
printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED);
|
||||
if (renderer == nullptr)
|
||||
{
|
||||
SDL_Log("Error creating SDL_Renderer!");
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
//SDL_RendererInfo info;
|
||||
//SDL_GetRendererInfo(renderer, &info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue