Always use SDL wrapper for file access

This commit is contained in:
Anders Jenbo 2021-10-20 16:44:12 +02:00
commit 8df5912dc6
8 changed files with 46 additions and 62 deletions

View file

@ -16,6 +16,7 @@
#include "dx.h"
#include "pfile.h"
#include "storm/storm.h"
#include "storm/storm_sdl_rw.h"
#include "utils/language.h"
#include "utils/log.hpp"
#include "utils/paths.h"
@ -189,10 +190,10 @@ void init_archives()
if (spawn_mpq != nullptr)
gbIsSpawn = true;
}
HANDLE fh = nullptr;
if (!SFileOpenFile("ui_art\\title.pcx", &fh))
SDL_RWops *handle = SFileOpenRw("ui_art\\title.pcx");
if (handle == nullptr)
InsertCDDlg();
SFileCloseFileThreadSafe(fh);
SDL_RWclose(handle);
patch_rt_mpq = LoadMPQ(paths, "patch_rt.mpq");
if (patch_rt_mpq == nullptr)