Fix bug 2034: replace printf by SDL_Log in tests; update loopwave VS solution: copy missing dependency
This commit is contained in:
parent
a0bc602061
commit
16a40598f6
47 changed files with 616 additions and 505 deletions
|
@ -68,13 +68,16 @@ int main(int argc,char** argv)
|
|||
int access = 0;
|
||||
SDL_Rect texture_dimensions;;
|
||||
|
||||
/* Enable standard application logging */
|
||||
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
|
||||
|
||||
if(argc < 2) {
|
||||
printf("SDL_Shape requires at least one bitmap file as argument.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Shape requires at least one bitmap file as argument.");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if(SDL_VideoInit(NULL) == -1) {
|
||||
printf("Could not initialize SDL video.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not initialize SDL video.");
|
||||
exit(-2);
|
||||
}
|
||||
|
||||
|
@ -91,7 +94,7 @@ int main(int argc,char** argv)
|
|||
SDL_FreeSurface(pictures[j].surface);
|
||||
SDL_free(pictures);
|
||||
SDL_VideoQuit();
|
||||
printf("Could not load surface from named bitmap file.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not load surface from named bitmap file.");
|
||||
exit(-3);
|
||||
}
|
||||
|
||||
|
@ -112,7 +115,7 @@ int main(int argc,char** argv)
|
|||
SDL_FreeSurface(pictures[i].surface);
|
||||
SDL_free(pictures);
|
||||
SDL_VideoQuit();
|
||||
printf("Could not create shaped window for SDL_Shape.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not create shaped window for SDL_Shape.");
|
||||
exit(-4);
|
||||
}
|
||||
renderer = SDL_CreateRenderer(window,-1,0);
|
||||
|
@ -122,7 +125,7 @@ int main(int argc,char** argv)
|
|||
SDL_FreeSurface(pictures[i].surface);
|
||||
SDL_free(pictures);
|
||||
SDL_VideoQuit();
|
||||
printf("Could not create rendering context for SDL_Shape window.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not create rendering context for SDL_Shape window.");
|
||||
exit(-5);
|
||||
}
|
||||
|
||||
|
@ -141,7 +144,7 @@ int main(int argc,char** argv)
|
|||
SDL_DestroyRenderer(renderer);
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_VideoQuit();
|
||||
printf("Could not create texture for SDL_shape.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not create texture for SDL_shape.");
|
||||
exit(-6);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue