Merge pull request #672 from slothlife/windows-icon-fix

Fix for loading window icon on Windows
sceneinput
scrawl 10 years ago
commit 05d2790601

@ -414,7 +414,7 @@ void OMW::Engine::setWindowIcon()
{ {
boost::filesystem::ifstream windowIconStream; boost::filesystem::ifstream windowIconStream;
std::string windowIcon = (mResDir / "mygui" / "openmw.png").string(); std::string windowIcon = (mResDir / "mygui" / "openmw.png").string();
windowIconStream.open(windowIcon); windowIconStream.open(windowIcon, std::ios_base::in | std::ios_base::binary);
if (windowIconStream.fail()) if (windowIconStream.fail())
std::cerr << "Failed to open " << windowIcon << std::endl; std::cerr << "Failed to open " << windowIcon << std::endl;
osgDB::ReaderWriter* reader = osgDB::Registry::instance()->getReaderWriterForExtension("png"); osgDB::ReaderWriter* reader = osgDB::Registry::instance()->getReaderWriterForExtension("png");

Loading…
Cancel
Save