Fix legacy graphics not working on Windows

This commit is contained in:
2015-06-23 19:48:15 -04:00
parent b85d177164
commit dd90a18569

View File

@@ -2178,7 +2178,13 @@ void load_spec_graphics_v1(fs::path scen_file) {
graphics_store.createMaskFromColor(sf::Color::White);
spec_scen_g.is_old = true;
spec_scen_g.sheets = new sf::Texture[1];
spec_scen_g.sheets[0].loadFromImage(graphics_store);
spec_scen_g.numSheets = 1;
if(!spec_scen_g.sheets[0].loadFromImage(graphics_store)) {
giveError("An error occurred while converting old-style graphics into the new format.",noGraphics);
spec_scen_g.is_old = false;
spec_scen_g.numSheets = 0;
delete[] spec_scen_g.sheets;
}
}
}
reload_core_graphics();