[Scummvm-cvs-logs] SF.net SVN: scummvm: [23192] scummvm/trunk/backends/wince/wince-sdl.cpp
knakos at users.sourceforge.net
knakos at users.sourceforge.net
Tue Jun 20 20:03:09 CEST 2006
Revision: 23192
Author: knakos
Date: 2006-06-20 11:03:02 -0700 (Tue, 20 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23192&view=rev
Log Message:
-----------
fix vga device overlays and invalid mouse cursor calls
Modified Paths:
--------------
scummvm/trunk/backends/wince/wince-sdl.cpp
Modified: scummvm/trunk/backends/wince/wince-sdl.cpp
===================================================================
--- scummvm/trunk/backends/wince/wince-sdl.cpp 2006-06-20 17:54:09 UTC (rev 23191)
+++ scummvm/trunk/backends/wince/wince-sdl.cpp 2006-06-20 18:03:02 UTC (rev 23192)
@@ -1185,15 +1185,22 @@
// Overlay
- _overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth, _overlayHeight, 16, 0, 0, 0, 0);
- if (_overlayscreen == NULL)
- error("_overlayscreen failed");
- _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth + 3, _overlayHeight + 3, 16, 0, 0, 0, 0);
- if (_tmpscreen2 == NULL)
- error("_tmpscreen2 failed");
+ if (CEDevice::hasDesktopResolution()) {
+ _overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth * _scaleFactorXm / _scaleFactorXd, _overlayHeight * _scaleFactorYm / _scaleFactorYd, 16, 0, 0, 0, 0);
+ if (_overlayscreen == NULL)
+ error("_overlayscreen failed");
+ _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth * _scaleFactorXm / _scaleFactorXd + 3, _overlayHeight * _scaleFactorYm / _scaleFactorYd + 3, 16, 0, 0, 0, 0);
+ if (_tmpscreen2 == NULL)
+ error("_tmpscreen2 failed");
+ } else {
+ _overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth, _overlayHeight, 16, 0, 0, 0, 0);
+ if (_overlayscreen == NULL)
+ error("_overlayscreen failed");
+ _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth + 3, _overlayHeight + 3, 16, 0, 0, 0, 0);
+ if (_tmpscreen2 == NULL)
+ error("_tmpscreen2 failed");
+ }
-
-
// Toolbar
uint16 *toolbar_screen = (uint16 *)calloc(320 * 40, sizeof(uint16));
_toolbarLow = SDL_CreateRGBSurfaceFrom(toolbar_screen,
@@ -1445,8 +1452,8 @@
}
// clip inside platform screen (landscape,bottom only)
- if (_orientationLandscape && !_zoomDown && dst_y+dst_h > _platformScreenWidth)
- dst_h = _platformScreenWidth - dst_y;
+ if (_orientationLandscape && !_zoomDown && dst_y+dst_h > _screenHeight)
+ dst_h = _screenHeight - dst_y;
if (!_zoomDown)
_scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
@@ -1698,6 +1705,8 @@
void OSystem_WINCE3::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale) {
undrawMouse();
+ if (w == 0 || h == 0)
+ return;
assert(w <= MAX_MOUSE_W);
assert(h <= MAX_MOUSE_H);
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