aboutsummaryrefslogtreecommitdiff
path: root/engines/igor/menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/igor/menu.cpp')
-rw-r--r--engines/igor/menu.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/igor/menu.cpp b/engines/igor/menu.cpp
index abe38d35ea..60d1d287c3 100644
--- a/engines/igor/menu.cpp
+++ b/engines/igor/menu.cpp
@@ -143,7 +143,7 @@ void IgorEngine::handleOptionsMenu_paintQuit() {
bool IgorEngine::handleOptionsMenu_handleKeyDownQuit(int key) {
if (key == Common::KEYCODE_y) {
- _currentPart = 255; // display the shareware screens
+ _currentPart = kInvalidPart;
}
return true;
}
@@ -257,13 +257,13 @@ void IgorEngine::handleOptionsMenu() {
int currentPage = 0;
bool menuLoop = true;
bool focusOnPage = false;
- while (menuLoop && _currentPart != 255) {
+ while (menuLoop && !_eventQuitGame && _currentPart != kInvalidPart) {
int previousPage = currentPage;
Common::Event ev;
while (_eventMan->pollEvent(ev)) {
switch (ev.type) {
case Common::EVENT_QUIT:
- _currentPart = 255;
+ _currentPart = kInvalidPart;
_eventQuitGame = true;
break;
case Common::EVENT_KEYDOWN:
@@ -333,6 +333,11 @@ void IgorEngine::handleOptionsMenu() {
_system->updateScreen();
_system->delayMillis(1000 / 60);
}
+ if (!_eventQuitGame && _currentPart == kInvalidPart) {
+ if (_gameVersion == kIdEngDemo100 || _gameVersion == kIdEngDemo110) {
+ _currentPart = kSharewarePart;
+ }
+ }
}
void IgorEngine::handlePause() {