diff --git a/src/Back.cpp b/src/Back.cpp index 8b2d5fa5..4c7f0651 100644 --- a/src/Back.cpp +++ b/src/Back.cpp @@ -20,8 +20,13 @@ bool InitBack(char *fName, int type) SDL_Surface *temp = SDL_LoadBMP(path); if (!temp) - return false; - + { + sprintf(path, "%s/%s.bmp", gDataPath, fName); + temp = SDL_LoadBMP(path); + if (!temp) + return false; + } + gBack.partsW = temp->w; gBack.partsH = temp->h; diff --git a/src/Draw.cpp b/src/Draw.cpp index 016b4a7b..8e7a6bab 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -305,6 +305,7 @@ static bool LoadBitmap_File(const char *name, int surf_no, bool create_surface) if (!IsEnableBitmap(fp)) { printf("Tried to load bitmap to surface %d, but it's missing the '(C)Pixel' string\n", surf_no); + fp->close(fp); } else {