[Scummvm-devel] consoles, warnings, errors and so forth

A. Milburn fuzzie at users.sourceforge.net
Wed Jun 1 12:37:26 CEST 2011


Hi all,

We semi-recently had a discussion/argument about disabling the Windows
console by default. I am somewhat wary of returning to the topic, since
it ended up being somewhat of a flamewar, but..

The (accidental) disabling of the Windows console in recent builds reminded
me about it, since it's more difficult for users to provide needed info
now -- somewhat because there's no code to *enable* the console, but since
this is also a problem on Linux and etc, and there's no way to magically
enable a console at runtime there (and distros are unlikely to provide a
'with console' shortcut), it brought me to thinking about it again.

It's also important to me that I be able to ask users which warnings they
saw from scummvm when they have problems - although not necessarily in
real-time.

So I'd really like to discuss again the idea of removing the need for
an external console at all.

My immediate thoughts about *solutions* are:

* Can we fix the Advanced Detector so that it calls logMessage for unknown
  games etc? Perhaps we need to add a kInfo type for these messages?
  (It would also be nice to find a way for a fallback detector to do the
  same, at the moment I have one for Living Books sitting in my tree
  because I don't really want to add it with printf()s.)

* Could we furthermore add a GUIWarningMessage function which displays a
  dialog for such cases? And fix both that and GUIErrorMessage to
  also call logMessage and print to the console?

* Does it make sense to move the printf() functionality out of all of these
  callers and into logMessage anyway? I'm thinking of error, warning, etc.
  .. if we do that, can we stop warning() from being included in an #ifdef
  DISABLE_TEXT_CONSOLE and do that work in the relevant backend?

* Could we make logMessage also add lines to the in-game debug consoles, at
  least in the case of warnings, so that users can simply look there?
  And perhaps have a uniform keystroke for opening the console? Maybe even
  a little fade in/out warning icon or similar? (Okay, maybe that last one
  is crazy). In any case, it would be neat to have a backlog of warnings
  before an error, given the errors *do* end up in the in-game debug consoles.

* If we add something like a GUIWarningMessage, could we also look into
  adding a simple button on supported OSes (Windows, Mac, Linux, etc) which
  offers to open a text editor with the contents of the log file? It is
  not very discoverable otherwise, and seems like a much more immediate
  solution than the web browser form submission discussed on-list, but still
  more usable than Max's proposal to provide instructions for finding it.

These are perhaps not very well thought out (although I would really appreciate
a nice way to get warnings on the in-game debug consoles) but hopefully all of
them would be relatively easy to implement.. but since most of it is fairly
invasive and people might not be happy with it, I thought I'd better bring it
up for discussion here rather than just complaining on IRC!

- fuzzie




More information about the Scummvm-devel mailing list