Fix legacy graphics not working on Windows
This commit is contained in:
@@ -2178,7 +2178,13 @@ void load_spec_graphics_v1(fs::path scen_file) {
|
|||||||
graphics_store.createMaskFromColor(sf::Color::White);
|
graphics_store.createMaskFromColor(sf::Color::White);
|
||||||
spec_scen_g.is_old = true;
|
spec_scen_g.is_old = true;
|
||||||
spec_scen_g.sheets = new sf::Texture[1];
|
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();
|
reload_core_graphics();
|
||||||
|
|||||||
Reference in New Issue
Block a user