diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/script_v100he.cpp | 14 | ||||
-rw-r--r-- | engines/scumm/he/script_v70he.cpp | 14 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 14 |
3 files changed, 39 insertions, 3 deletions
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 414cbd62d3..28c7ecd77f 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -1665,7 +1665,19 @@ void ScummEngine_v100he::o100_setSystemMessage() { switch (subOp) { case 80: // Set Window Caption - _system->setWindowCaption((const char *)name); + // TODO: The 'name' string can contain non-ASCII data. This can lead to + // problems, because (a) the encoding used for "name" is not clear, + // (b) OSystem::setWindowCaption only supports ASCII. As a result, odd + // behavior can occur, from strange wrong titles, up to crashes (happens + // under Mac OS X). + // + // Possible fixes/workarounds: + // - Simply stop using this. It's a rather unimportant "feature" anyway. + // - Try to translate the text to ASCII. + // - Refine OSystem to accept window captions that are non-ASCII, e.g. + // by enhancing all backends to deal with UTF-8 data. Of course, then + // one still would have to convert 'name' to the correct encoding. + //_system->setWindowCaption((const char *)name); break; case 131: // Set Version debug(1,"o100_setSystemMessage: (%d) %s", subOp, name); diff --git a/engines/scumm/he/script_v70he.cpp b/engines/scumm/he/script_v70he.cpp index e955f1267b..bd70845f67 100644 --- a/engines/scumm/he/script_v70he.cpp +++ b/engines/scumm/he/script_v70he.cpp @@ -1102,7 +1102,19 @@ void ScummEngine_v70he::o70_setSystemMessage() { debug(1,"o70_setSystemMessage: (%d) %s", subOp, name); break; case 243: // Set Window Caption - _system->setWindowCaption((const char *)name); + // TODO: The 'name' string can contain non-ASCII data. This can lead to + // problems, because (a) the encoding used for "name" is not clear, + // (b) OSystem::setWindowCaption only supports ASCII. As a result, odd + // behavior can occur, from strange wrong titles, up to crashes (happens + // under Mac OS X). + // + // Possible fixes/workarounds: + // - Simply stop using this. It's a rather unimportant "feature" anyway. + // - Try to translate the text to ASCII. + // - Refine OSystem to accept window captions that are non-ASCII, e.g. + // by enhancing all backends to deal with UTF-8 data. Of course, then + // one still would have to convert 'name' to the correct encoding. + //_system->setWindowCaption((const char *)name); break; default: error("o70_setSystemMessage: default case %d", subOp); diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index a97ae843f1..605d490738 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -2273,7 +2273,19 @@ void ScummEngine_v72he::o72_setSystemMessage() { debug(1,"o72_setSystemMessage: (%d) %s", subOp, name); break; case 243: // Set Window Caption - _system->setWindowCaption((const char *)name); + // TODO: The 'name' string can contain non-ASCII data. This can lead to + // problems, because (a) the encoding used for "name" is not clear, + // (b) OSystem::setWindowCaption only supports ASCII. As a result, odd + // behavior can occur, from strange wrong titles, up to crashes (happens + // under Mac OS X). + // + // Possible fixes/workarounds: + // - Simply stop using this. It's a rather unimportant "feature" anyway. + // - Try to translate the text to ASCII. + // - Refine OSystem to accept window captions that are non-ASCII, e.g. + // by enhancing all backends to deal with UTF-8 data. Of course, then + // one still would have to convert 'name' to the correct encoding. + //_system->setWindowCaption((const char *)name); break; default: error("o72_setSystemMessage: default case %d", subOp); |