/*
- Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
/* Load the sprite image */
temp = SDL_LoadBMP(file);
if (temp == NULL) {
- SDLTest_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError());
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError());
return NULL;
}
/* Create textures from the image */
texture = SDL_CreateTextureFromSurface(renderer, temp);
if (!texture) {
- SDLTest_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError());
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError());
SDL_FreeSurface(temp);
return NULL;
}
#endif
}
int
-SDL_main(int argc, char *argv[])
+main(int argc, char *argv[])
{
int i;
int frames;
consumed = SDLTest_CommonArg(state, i);
if (consumed == 0) {
- SDLTest_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
+ SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
return 1;
}
i += consumed;
now = SDL_GetTicks();
if (now > then) {
double fps = ((double) frames * 1000) / (now - then);
- SDLTest_Log("%2.2f frames per second\n", fps);
+ SDL_Log("%2.2f frames per second\n", fps);
}
SDL_stack_free(drawstates);