[Scummvm-cvs-logs] SF.net SVN: scummvm:[35857] scummvm/trunk/gui
jvprat at users.sourceforge.net
jvprat at users.sourceforge.net
Wed Jan 14 03:44:09 CET 2009
Revision: 35857
http://scummvm.svn.sourceforge.net/scummvm/?rev=35857&view=rev
Author: jvprat
Date: 2009-01-14 02:44:09 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
Use the current palette size for the theme mouse cursor instead of using the maximum (fixes a valgrind warning)
Modified Paths:
--------------
scummvm/trunk/gui/ThemeEngine.cpp
scummvm/trunk/gui/ThemeEngine.h
Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp 2009-01-14 02:08:44 UTC (rev 35856)
+++ scummvm/trunk/gui/ThemeEngine.cpp 2009-01-14 02:44:09 UTC (rev 35857)
@@ -220,7 +220,7 @@
_system->showOverlay();
if (_useCursor) {
- CursorMan.replaceCursorPalette(_cursorPal, 0, MAX_CURS_COLORS);
+ CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize);
CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale);
}
}
@@ -231,7 +231,7 @@
return;
if (_useCursor) {
- CursorMan.pushCursorPalette(_cursorPal, 0, MAX_CURS_COLORS);
+ CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize);
CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale);
CursorMan.showMouse(true);
}
@@ -1002,6 +1002,7 @@
}
_useCursor = true;
+ _cursorPalSize = colorsFound;
return true;
}
Modified: scummvm/trunk/gui/ThemeEngine.h
===================================================================
--- scummvm/trunk/gui/ThemeEngine.h 2009-01-14 02:08:44 UTC (rev 35856)
+++ scummvm/trunk/gui/ThemeEngine.h 2009-01-14 02:44:09 UTC (rev 35857)
@@ -684,6 +684,7 @@
bool _needPaletteUpdates;
uint _cursorWidth, _cursorHeight;
byte _cursorPal[4*MAX_CURS_COLORS];
+ byte _cursorPalSize;
};
} // end of namespace GUI.
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