[Scummvm-devel] GUIErrorMessage method

Paul Gilbert paulfgilbert at gmail.com
Thu Aug 20 15:20:36 CEST 2009

Hi everyone,

I was working on some code today, and happened to follow execution into the
GUIErrorMessage method in engines\engine.cpp, shown below:

void GUIErrorMessage(const Common::String msg) {
        g_system->initSize(320, 200);
    if (g_system->endGFXTransaction() == OSystem::kTransactionSuccess) {
        GUI::MessageDialog dialog(msg);
    } else {
        error("%s", msg.c_str());

I was curious as to why the method explicitly changes the graphics mode to
320x200 - is it necessary for some reason? When calling it from a windowed
640x480 mode it really looks weird to have the size of the window shrink to
320x200 non-scaled as the dialogue is shown. Would a game not running at
320x200 then be expected to restore the resolution back to whatever was
needed after the method finishes (presuming there is a reason for the size
change)? Or should the method itself be made responsible for restoring the
old resolution?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090820/7643f3a0/attachment.html>

More information about the Scummvm-devel mailing list