Fix load_g1() when using boost (#53)

This commit is contained in:
Richard Jenkins 2018-01-26 13:28:37 +00:00 committed by Ted John
parent e684b74553
commit 733feb76e2
1 changed files with 4 additions and 0 deletions

View File

@ -55,7 +55,11 @@ namespace openloco::gfx
void load_g1()
{
auto g1Path = environment::get_path(environment::path_id::g1);
#ifdef _OPENLOCO_USE_BOOST_FS_
std::ifstream stream(g1Path.make_preferred().string(), std::ios::in | std::ios::binary);
#else
std::ifstream stream(g1Path, std::ios::in | std::ios::binary);
#endif
if (!stream)
{
throw std::runtime_error("Opening g1 file failed.");