Use PNG files for tests and examples
These are much smaller than the previous BMP files Fixes https://github.com/libsdl-org/SDL/issues/14159
This commit is contained in:
@@ -473,7 +473,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
if (consumed <= 0) {
|
||||
static const char *options[] = { "[icon.bmp]", NULL };
|
||||
static const char *options[] = { "[icon.png]", NULL };
|
||||
SDLTest_CommonLogUsage(state, argv[0], options);
|
||||
exit(1);
|
||||
}
|
||||
@@ -501,12 +501,12 @@ int main(int argc, char **argv)
|
||||
exit(2);
|
||||
}
|
||||
|
||||
filename = GetResourceFilename(NULL, "icon.bmp");
|
||||
surface = SDL_LoadBMP(filename);
|
||||
filename = GetResourceFilename(NULL, "icon.png");
|
||||
surface = SDL_LoadPNG(filename);
|
||||
SDL_free(filename);
|
||||
|
||||
if (!surface) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to load icon.bmp: %s", SDL_GetError());
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to load icon.png: %s", SDL_GetError());
|
||||
SDL_Quit();
|
||||
exit(3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user