editor: Print error to stderr if display::screenshot() fails

This is used by the --screenshot command line option.
This commit is contained in:
Ignacio R. Morelle 2015-04-10 01:28:12 -03:00
parent 6a2abfcb78
commit 5de0bbbf28

View file

@ -191,7 +191,9 @@ void editor_controller::status_table() {
void editor_controller::do_screenshot(const std::string& screenshot_filename /* = "map_screenshot.bmp" */)
{
try {
gui().screenshot(screenshot_filename,true);
if (!gui().screenshot(screenshot_filename,true)) {
ERR_ED << "Screenshot creation failed!\n";
}
} catch (twml_exception& e) {
e.show(gui());
}