[Scummvm-cvs-logs] SF.net SVN: scummvm:[47602] scummvm/trunk/engines/sci
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Wed Jan 27 17:54:59 CET 2010
Revision: 47602
http://scummvm.svn.sourceforge.net/scummvm/?rev=47602&view=rev
Author: mthreepwood
Date: 2010-01-27 16:54:58 +0000 (Wed, 27 Jan 2010)
Log Message:
-----------
Only reshow the cursor after playing a video if it was originally showing beforehand. This fixes the GK1 demo menu.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/graphics/gui.cpp
scummvm/trunk/engines/sci/graphics/gui.h
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-27 16:04:46 UTC (rev 47601)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-27 16:54:58 UTC (rev 47602)
@@ -1030,7 +1030,11 @@
if (argc == 1)
return NULL_REG;
- s->_gui->hideCursor();
+ // Hide the cursor if it's showing and then show it again if it was
+ // previously visible.
+ bool reshowCursor = s->_gui->isCursorVisible();
+ if (reshowCursor)
+ s->_gui->hideCursor();
// The Windows and DOS versions use different video format as well
// as a different argument set.
@@ -1072,7 +1076,8 @@
if (playedVideo)
s->_gui->syncWithFramebuffer();
- s->_gui->showCursor();
+ if (reshowCursor)
+ s->_gui->showCursor();
return s->r_acc;
}
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-27 16:04:46 UTC (rev 47601)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-27 16:54:58 UTC (rev 47602)
@@ -788,6 +788,10 @@
_cursor->show();
}
+bool SciGui::isCursorVisible() {
+ return _cursor->isVisible();
+}
+
void SciGui::setCursorShape(GuiResourceId cursorId) {
_cursor->setShape(cursorId);
}
Modified: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h 2010-01-27 16:04:46 UTC (rev 47601)
+++ scummvm/trunk/engines/sci/graphics/gui.h 2010-01-27 16:54:58 UTC (rev 47602)
@@ -132,6 +132,7 @@
void hideCursor();
void showCursor();
+ bool isCursorVisible();
void setCursorShape(GuiResourceId cursorId);
void setCursorView(GuiResourceId viewNum, int loopNum, int cellNum, Common::Point *hotspot);
virtual void setCursorPos(Common::Point pos);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list