FREESCAPE: lock pointer to avoid issues when moving the camera

This commit is contained in:
neuromancer 2022-12-30 19:02:32 -03:00
parent 0e6cccb2c2
commit f9130c3700
2 changed files with 7 additions and 0 deletions

View File

@ -408,7 +408,9 @@ void FreescapeEngine::processInput() {
drawFrame();
_savedScreen = _gfx->getScreenshot();
_gfx->setViewport(_fullscreenViewArea);
g_system->lockMouse(false);
openMainMenuDialog();
g_system->lockMouse(true);
_gfx->setViewport(_viewArea);
_savedScreen->free();
delete _savedScreen;
@ -509,6 +511,7 @@ Common::Error FreescapeEngine::run() {
_gfx->convertImageFormatIfNecessary(_title);
_gfx->convertImageFormatIfNecessary(_border);
g_system->lockMouse(true);
// Simple main event loop
int saveSlot = ConfMan.getInt("save_slot");

View File

@ -966,11 +966,15 @@ void DrillerEngine::drawInfoMenu() {
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == Common::KEYCODE_l) {
_gfx->setViewport(_fullscreenViewArea);
g_system->lockMouse(false);
loadGameDialog();
g_system->lockMouse(true);
_gfx->setViewport(_viewArea);
} else if (event.kbd.keycode == Common::KEYCODE_s) {
_gfx->setViewport(_fullscreenViewArea);
g_system->lockMouse(false);
saveGameDialog();
g_system->lockMouse(true);
_gfx->setViewport(_viewArea);
} else if (isDOS() && event.kbd.keycode == Common::KEYCODE_t) {
// TODO