Skip to content

Commit be6bd3a

Browse files
committed
windows and c++ standard still cant do preferred seps right so do it ourself
1 parent 63e3587 commit be6bd3a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/scene/EditorScene.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,13 @@ void LEditorScene::SetRoom(std::shared_ptr<LRoomDOMNode> room)
545545
} else {
546546
//If this is happening the map only has room models, no furniture.
547547
bStream::CFileStream bin(resPath.string(), bStream::Endianess::Big, bStream::OpenMode::In);
548-
mRoomModels.insert({ std::filesystem::path(curRoomData->GetResourcePath()).make_preferred().string(), std::make_shared<BinModel>(&bin)});
548+
#ifdef _WIN32
549+
std::string resPath = curRoomData->GetResourcePath();
550+
std::replace(resPath.begin(), resPath.end(), "/", "\\");
551+
mRoomModels.insert({ resPath, std::make_shared<BinModel>(&bin)});
552+
#else
553+
mRoomModels.insert({ curRoomData->GetResourcePath(), std::make_shared<BinModel>(&bin)});
554+
#endif
549555
}
550556
}
551557

0 commit comments

Comments
 (0)