SCI: Fix Mac icon bar crash on restart (KQ6, FPFP)
Add support for reinitializing the mac icon bar when restarting. Restarting runs the game's init script which calls KPlatform again. Prior to this, restarting these games would fail an assertion.
This commit is contained in:
parent
b2c79fdf4b
commit
0008fab4f5
3 changed files with 21 additions and 3 deletions
|
@ -503,8 +503,7 @@ reg_t kIconBar(EngineState *s, int argc, reg_t *argv) {
|
|||
|
||||
switch (argv[0].toUint16()) {
|
||||
case 0: // InitIconBar
|
||||
for (int i = 0; i < argv[1].toUint16(); i++)
|
||||
g_sci->_gfxMacIconBar->addIcon(argv[i + 2]);
|
||||
g_sci->_gfxMacIconBar->initIcons(argv[1].toUint16(), &argv[2]);
|
||||
break;
|
||||
case 1: // DisposeIconBar
|
||||
warning("kIconBar(Dispose)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue