This commit is contained in:
Clownacy 2019-02-11 14:56:58 +00:00
commit a235d1c25e
2 changed files with 4 additions and 11 deletions

View file

@ -241,18 +241,10 @@ static bool LoadBitmap_File(const char *name, int surf_no, bool create_surface)
fp = SDL_RWFromFile(path, "rb"); fp = SDL_RWFromFile(path, "rb");
if (fp) if (fp)
{ {
if (!IsEnableBitmap(fp))
{
printf("Tried to load bitmap to surface %d, but it's missing the '(C)Pixel' string\n", surf_no);
}
else
{
printf("Loading surface (as .bmp) from %s for surface id %d\n", path, surf_no); printf("Loading surface (as .bmp) from %s for surface id %d\n", path, surf_no);
if (LoadBitmap(fp, surf_no, create_surface)) if (LoadBitmap(fp, surf_no, create_surface))
return true; return true;
} }
}
printf("Failed to open file %s\n", name); printf("Failed to open file %s\n", name);
return false; return false;

View file

@ -280,6 +280,7 @@ int main(int argc, char *argv[])
} }
//Create window //Create window
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl");
gWindow = SDL_CreateWindow(lpWindowName, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, gWindowWidth, gWindowHeight, bFullscreen ? SDL_WINDOW_FULLSCREEN : 0); gWindow = SDL_CreateWindow(lpWindowName, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, gWindowWidth, gWindowHeight, bFullscreen ? SDL_WINDOW_FULLSCREEN : 0);
if (gWindow) if (gWindow)