aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2003-09-20 00:47:56 +0000
committerMax Horn2003-09-20 00:47:56 +0000
commit7d95a33922e3bf5bff8b5e5a93e8a5b35b970ef4 (patch)
treed584f72be6b59c6d0c028b802d29a89ed185417d /gui
parentb75626d1ce9fbc0b2ccde68005d7df8886af4c32 (diff)
downloadscummvm-rg350-7d95a33922e3bf5bff8b5e5a93e8a5b35b970ef4.tar.gz
scummvm-rg350-7d95a33922e3bf5bff8b5e5a93e8a5b35b970ef4.tar.bz2
scummvm-rg350-7d95a33922e3bf5bff8b5e5a93e8a5b35b970ef4.zip
make use of the new get_overlay_height/get_overlay_width
svn-id: r10327
Diffstat (limited to 'gui')
-rw-r--r--gui/newgui.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index ef75e9a575..736be2d8c8 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -224,15 +224,18 @@ void NewGui::runLoop() {
#pragma mark -
void NewGui::saveState() {
- int sys_height = _system->get_height();
- int sys_width = _system->get_width();
// Backup old cursor
_oldCursorMode = _system->show_mouse(true);
+ // Enable the overlay
_system->show_overlay();
- // TODO - add getHeight & getWidth methods to OSystem.
- _screen = (NewGuiColor*)calloc(sys_width*sys_height,sizeof(NewGuiColor));
+
+ // Create a screen buffer for the overlay data, and fill it with
+ // whatever is visible on the screen rught now.
+ int sys_height = _system->get_overlay_height();
+ int sys_width = _system->get_overlay_width();
+ _screen = (NewGuiColor*)calloc(sys_width * sys_height, sizeof(NewGuiColor));
_screenPitch = sys_width;
_system->grab_overlay(_screen, _screenPitch);