TSAGE: Fix to prevent saving or loading when conversation dialogs are active
This commit is contained in:
parent
a8de5dfad8
commit
a559e64ca6
1 changed files with 8 additions and 0 deletions
|
@ -451,6 +451,13 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
|
||||||
draw();
|
draw();
|
||||||
g_globals->_events.showCursor();
|
g_globals->_events.showCursor();
|
||||||
|
|
||||||
|
// WORKAROUND: On-screen dialogs are really meant to use a GfxManager instance
|
||||||
|
// for their lifetime, which prevents saving or loading. Since I don't want to spend a lot
|
||||||
|
// of time refactoring this already working dialog, fake it by putting a dummy gfxmanager at
|
||||||
|
// the end of the gfx manager list so as to prevent saving or loading
|
||||||
|
GfxManager gfxManager;
|
||||||
|
GLOBALS._gfxManagers.push_back(&gfxManager);
|
||||||
|
|
||||||
// Event handling loop
|
// Event handling loop
|
||||||
Event event;
|
Event event;
|
||||||
while (!g_vm->shouldQuit()) {
|
while (!g_vm->shouldQuit()) {
|
||||||
|
@ -502,6 +509,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
|
||||||
|
|
||||||
// Remove the dialog
|
// Remove the dialog
|
||||||
remove();
|
remove();
|
||||||
|
GLOBALS._gfxManagers.remove(&gfxManager);
|
||||||
|
|
||||||
return _selectedIndex;
|
return _selectedIndex;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue