diff options
Diffstat (limited to 'backends')
114 files changed, 989 insertions, 743 deletions
diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp index b4e106b790..91118d36c1 100644 --- a/backends/events/gph/gph-events.cpp +++ b/backends/events/gph/gph-events.cpp @@ -161,49 +161,6 @@ GPHEventSource::GPHEventSource()  	: _buttonStateL(false) {  } -void GPHEventSource::moveStick() { -	bool stickBtn[32]; - -	memcpy(stickBtn, _stickBtn, sizeof(stickBtn)); - -	if ((stickBtn[0]) || (stickBtn[2]) || (stickBtn[4]) || (stickBtn[6])) -		stickBtn[1] = stickBtn[3] = stickBtn[5] = stickBtn[7] = 0; - -	if ((stickBtn[1]) || (stickBtn[2]) || (stickBtn[3])) { -		if (_km.x_down_count != 2) { -			_km.x_vel = -1; -			_km.x_down_count = 1; -		} else -			_km.x_vel = -4; -	} else if ((stickBtn[5]) || (stickBtn[6]) || (stickBtn[7])) { -		if (_km.x_down_count != 2) { -			_km.x_vel = 1; -			_km.x_down_count = 1; -		} else -			_km.x_vel = 4; -	} else { -		_km.x_vel = 0; -		_km.x_down_count = 0; -	} - -	if ((stickBtn[0]) || (stickBtn[1]) || (stickBtn[7])) { -		if (_km.y_down_count != 2) { -			_km.y_vel = -1; -			_km.y_down_count = 1; -		} else -			_km.y_vel = -4; -	} else if ((stickBtn[3]) || (stickBtn[4]) || (stickBtn[5])) { -		if (_km.y_down_count != 2) { -			_km.y_vel = 1; -			_km.y_down_count = 1; -		} else -			_km.y_vel = 4; -	} else { -		_km.y_vel = 0; -		_km.y_down_count = 0; -	} -} -  /* Custom handleMouseButtonDown/handleMouseButtonUp to deal with 'Tap Mode' for the touchscreen */  bool GPHEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) { @@ -268,19 +225,110 @@ bool GPHEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {  bool GPHEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) { -	_stickBtn[ev.jbutton.button] = 1;  	event.kbd.flags = 0;  	switch (ev.jbutton.button) {  	case BUTTON_UP: -	case BUTTON_UPLEFT: -	case BUTTON_LEFT: -	case BUTTON_DOWNLEFT: +		if (_km.y_down_count != 2) { +			_km.y_vel = -1; +			_km.y_down_count = 1; +		} else { +			_km.y_vel = -4; +		} +		event.type = Common::EVENT_MOUSEMOVE; +		processMouseEvent(event, _km.x, _km.y); +		break;  	case BUTTON_DOWN: -	case BUTTON_DOWNRIGHT: +		if (_km.y_down_count != 2) { +			_km.y_vel = 1; +			_km.y_down_count = 1; +		} else { +			_km.y_vel = 4; +		} +		event.type = Common::EVENT_MOUSEMOVE; +		processMouseEvent(event, _km.x, _km.y); +		break; +	case BUTTON_LEFT: +		if (_km.x_down_count != 2) { +			_km.x_vel = -1; +			_km.x_down_count = 1; +		} else { +			_km.x_vel = -4; +		} +		event.type = Common::EVENT_MOUSEMOVE; +		processMouseEvent(event, _km.x, _km.y); +		break;  	case BUTTON_RIGHT: +		if (_km.x_down_count != 3) { +			_km.x_vel = 1; +			_km.x_down_count = 1; +		} else { +			_km.x_vel = 4; +		} +		event.type = Common::EVENT_MOUSEMOVE; +		processMouseEvent(event, _km.x, _km.y); +		break; +	case BUTTON_UPLEFT: +		if (_km.x_down_count != 2) { +			_km.x_vel = -1; +			_km.x_down_count = 1; +		} else { +				_km.x_vel = -4; +		} +		if (_km.y_down_count != 2) { +			_km.y_vel = -1; +			_km.y_down_count = 1; +		} else { +			_km.y_vel = -4; +		} +		event.type = Common::EVENT_MOUSEMOVE; +		processMouseEvent(event, _km.x, _km.y); +		break;  	case BUTTON_UPRIGHT: -		moveStick(); +		if (_km.x_down_count != 2) { +			_km.x_vel = 1; +			_km.x_down_count = 1; +		} else { +			_km.x_vel = 4; +		} +		if (_km.y_down_count != 2) { +			_km.y_vel = -1; +			_km.y_down_count = 1; +		} else { +			_km.y_vel = -4; +		} +		event.type = Common::EVENT_MOUSEMOVE; +		processMouseEvent(event, _km.x, _km.y); +		break; +	case BUTTON_DOWNLEFT: +		if (_km.x_down_count != 2) { +			_km.x_vel = -1; +			_km.x_down_count = 1; +		} else { +			_km.x_vel = -4; +		} +		if (_km.y_down_count != 2) { +			_km.y_vel = 1; +			_km.y_down_count = 1; +		} else { +			_km.y_vel = 4; +		} +		event.type = Common::EVENT_MOUSEMOVE; +		processMouseEvent(event, _km.x, _km.y); +		break; +	case BUTTON_DOWNRIGHT: +		if (_km.x_down_count != 2) { +			_km.x_vel = 1; +			_km.x_down_count = 1; +		} else { +			_km.x_vel = 4; +		} +		if (_km.y_down_count != 2) { +			_km.y_vel = 1; +			_km.y_down_count = 1; +		} else { +			_km.y_vel = 4; +		}  		event.type = Common::EVENT_MOUSEMOVE;  		processMouseEvent(event, _km.x, _km.y);  		break; @@ -391,7 +439,6 @@ bool GPHEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {  bool GPHEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) { -	_stickBtn[ev.jbutton.button] = 0;  	event.kbd.flags = 0;  	switch (ev.jbutton.button) { @@ -403,7 +450,10 @@ bool GPHEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {  	case BUTTON_DOWNRIGHT:  	case BUTTON_RIGHT:  	case BUTTON_UPRIGHT: -		moveStick(); +		_km.y_vel = 0; +		_km.y_down_count = 0; +		_km.x_vel = 0; +		_km.x_down_count = 0;  		event.type = Common::EVENT_MOUSEMOVE;  		processMouseEvent(event, _km.x, _km.y);  		break; diff --git a/backends/events/gph/gph-events.h b/backends/events/gph/gph-events.h index 7672bffed2..3b1e6f090a 100644 --- a/backends/events/gph/gph-events.h +++ b/backends/events/gph/gph-events.h @@ -34,18 +34,11 @@ public:  	GPHEventSource();  protected: -	bool _stickBtn[32]; -  	/**  	 * Button state for L button modifier  	 */  	bool _buttonStateL; -	/** -	 * Handles the stick movement -	 */ -	void moveStick(); -  	bool handleJoyButtonDown(SDL_Event &ev, Common::Event &event);  	bool handleJoyButtonUp(SDL_Event &ev, Common::Event &event);  	bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event); diff --git a/backends/events/openpandora/op-events.cpp b/backends/events/openpandora/op-events.cpp index c1d6362fcb..fc63cdf74f 100644 --- a/backends/events/openpandora/op-events.cpp +++ b/backends/events/openpandora/op-events.cpp @@ -44,7 +44,8 @@ enum {  	/* Touchscreen TapMode */  	TAPMODE_LEFT        = 0,  	TAPMODE_RIGHT       = 1, -	TAPMODE_HOVER       = 2 +	TAPMODE_HOVER       = 2, +	TAPMODE_HOVER_DPAD  = 3  };  OPEventSource::OPEventSource() @@ -63,6 +64,8 @@ bool OPEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {  			event.type = Common::EVENT_RBUTTONDOWN;  		else if (OP::tapmodeLevel == TAPMODE_HOVER) /* TAPMODE_HOVER = Hover (No Click) Tap Mode */  			event.type = Common::EVENT_MOUSEMOVE; +		else if (OP::tapmodeLevel == TAPMODE_HOVER_DPAD) /* TAPMODE_HOVER_DPAD = Hover (DPad Clicks) Tap Mode */ +			event.type = Common::EVENT_MOUSEMOVE;  		else  			event.type = Common::EVENT_LBUTTONDOWN; /* For normal mice etc. */  	} else if (ev.button.button == SDL_BUTTON_RIGHT) @@ -95,6 +98,8 @@ bool OPEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {  			event.type = Common::EVENT_RBUTTONUP;  		else if (OP::tapmodeLevel == TAPMODE_HOVER) /* TAPMODE_HOVER = Hover (No Click) Tap Mode */  			event.type = Common::EVENT_MOUSEMOVE; +		else if (OP::tapmodeLevel == TAPMODE_HOVER_DPAD) /* TAPMODE_HOVER_DPAD = Hover (DPad Clicks) Tap Mode */ +			event.type = Common::EVENT_MOUSEMOVE;  		else  			event.type = Common::EVENT_LBUTTONUP; /* For normal mice etc. */  	} else if (ev.button.button == SDL_BUTTON_RIGHT) @@ -117,6 +122,30 @@ bool OPEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {  bool OPEventSource::remapKey(SDL_Event &ev, Common::Event &event) { +	if (OP::tapmodeLevel == TAPMODE_HOVER_DPAD) { +		switch (ev.key.keysym.sym) { +		case SDLK_LEFT: +			event.type = (ev.type == SDL_KEYDOWN) ? Common::EVENT_LBUTTONDOWN : Common::EVENT_LBUTTONUP; +			processMouseEvent(event, _km.x, _km.y); +			return true; +			break; +		case SDLK_RIGHT: +			event.type = (ev.type == SDL_KEYDOWN) ? Common::EVENT_RBUTTONDOWN : Common::EVENT_RBUTTONUP; +			processMouseEvent(event, _km.x, _km.y); +			return true; +			break; +#if defined(SDL_BUTTON_MIDDLE) +		case SDLK_UP: +			event.type = (ev.type == SDL_KEYDOWN) ? Common::EVENT_MBUTTONDOWN : Common::EVENT_MBUTTONUP; +			processMouseEvent(event, _km.x, _km.y); +			return true; +			break; +#endif +		default: +		  break; +		} +	} +  	if (ev.type == SDL_KEYDOWN) {  		switch (ev.key.keysym.sym) {  		case SDLK_HOME: @@ -141,6 +170,8 @@ bool OPEventSource::remapKey(SDL_Event &ev, Common::Event &event) {  				g_system->displayMessageOnOSD(_("Touchscreen 'Tap Mode' - Right Click"));  			} else if (OP::tapmodeLevel == TAPMODE_HOVER) {  				g_system->displayMessageOnOSD(_("Touchscreen 'Tap Mode' - Hover (No Click)")); +			} else if (OP::tapmodeLevel == TAPMODE_HOVER_DPAD) { +				g_system->displayMessageOnOSD(_("Touchscreen 'Tap Mode' - Hover (DPad Clicks)"));  			}  			break;  		case SDLK_RSHIFT: diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp index f94171646a..0ca5bbb059 100644 --- a/backends/events/sdl/sdl-events.cpp +++ b/backends/events/sdl/sdl-events.cpp @@ -191,6 +191,8 @@ void SdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {  #endif  	if (mod & KMOD_CTRL)  		event.kbd.flags |= Common::KBD_CTRL; +	if (mod & KMOD_META) +		event.kbd.flags |= Common::KBD_META;  	// Sticky flags  	if (mod & KMOD_NUM) diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h index 2ba88c702b..ca4835126f 100644 --- a/backends/events/sdl/sdl-events.h +++ b/backends/events/sdl/sdl-events.h @@ -116,7 +116,7 @@ protected:  	//@}  	/** -	 * Assigns the mouse coords to the mouse event. Furthermore notify the  +	 * Assigns the mouse coords to the mouse event. Furthermore notify the  	 * graphics manager about the position change.  	 */  	virtual void processMouseEvent(Common::Event &event, int x, int y); diff --git a/backends/events/webossdl/webossdl-events.h b/backends/events/webossdl/webossdl-events.h index 99ed3105f8..1ba5c6fcbf 100644 --- a/backends/events/webossdl/webossdl-events.h +++ b/backends/events/webossdl/webossdl-events.h @@ -73,10 +73,10 @@ protected:  	// The current mouse position on the screen.  	int _curX, _curY; -	 +  	// The current screen dimensions  	int _screenX, _screenY; -	 +  	// The drag distance for linear gestures  	int _swipeDistX, _swipeDistY; @@ -107,7 +107,7 @@ protected:  	virtual bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);  	virtual bool handleMouseMotion(SDL_Event &ev, Common::Event &event);  	virtual bool pollEvent(Common::Event &event); -	 +  	// Utility functions  	void calculateDimensions();  }; diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 205dcfdbec..bd87c9fafd 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -432,7 +432,7 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() {  	// Forcefully disable aspect ratio correction for games  	// which starts with a native 240px height resolution.  	// This fixes games with weird resolutions, like MM Nes (256x240) -	if(_videoMode.screenHeight == 240) { +	if (_videoMode.screenHeight == 240) {  		_videoMode.aspectRatioCorrection = false;  	} @@ -479,7 +479,7 @@ void DINGUXSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)  	case OSystem::kFeatureCursorPalette:  		_cursorPaletteDisabled = !enable;  		blitCursor(); -		break;	 +		break;  	default:  		break;  	} diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 8521e88eaf..92553564bf 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -486,7 +486,13 @@ bool GPHGraphicsManager::loadGFXMode() {  		if (_videoMode.aspectRatioCorrection)  			_videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight);  	} -	return SurfaceSdlGraphicsManager::loadGFXMode(); +	SurfaceSdlGraphicsManager::loadGFXMode(); + +	// The old GP2X hacked SDL needs this after any call to SDL_SetVideoMode +	// and it does not hurt other devices. +	SDL_ShowCursor(SDL_DISABLE); + +	return true;  }  bool GPHGraphicsManager::hasFeature(OSystem::Feature f) { diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp index ce69dc4aab..ca674563df 100644 --- a/backends/graphics/opengl/gltexture.cpp +++ b/backends/graphics/opengl/gltexture.cpp @@ -108,9 +108,18 @@ void GLTexture::allocBuffer(GLuint w, GLuint h) {  	_realWidth = w;  	_realHeight = h; -	if (w <= _textureWidth && h <= _textureHeight && !_refresh) -		// Already allocated a sufficiently large buffer -		return; +	if (!_refresh) { +		if (npot_supported && _filter == GL_LINEAR) { +			// Check if we already allocated a correctly-sized buffer +			// This is so we don't need to duplicate the last row/column +			if (w == _textureWidth && h == _textureHeight) +				return; +		} else { +			// Check if we already have a large enough buffer +			if (w <= _textureWidth && h <= _textureHeight) +				return; +		} +	}  	if (npot_supported) {  		_textureWidth = w; @@ -151,12 +160,37 @@ void GLTexture::updateBuffer(const void *buf, int pitch, GLuint x, GLuint y, GLu  	} else {  		// Update the texture row by row  		const byte *src = (const byte *)buf; +		GLuint curY = y; +		GLuint height = h;  		do { -			glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, +			glTexSubImage2D(GL_TEXTURE_2D, 0, x, curY,  			                w, 1, _glFormat, _glType, src); CHECK_GL_ERROR(); -			++y; +			curY++;  			src += pitch; -		} while (--h); +		} while (--height); +	} + +	// If we're in linear filter mode, repeat the last row/column if the real dimensions +	// doesn't match the texture dimensions. +	if (_filter == GL_LINEAR) { +		if (_realWidth != _textureWidth && x + w == _realWidth) { +			const byte *src = (const byte *)buf + (w - 1) * _bytesPerPixel; +			GLuint curY = y; +			GLuint height = h; + +			do { +				glTexSubImage2D(GL_TEXTURE_2D, 0, x + w, +						curY, 1, 1, _glFormat, _glType, src); CHECK_GL_ERROR(); + +				curY++; +				src += pitch; +			} while (--height); +		} + +		if (_realHeight != _textureHeight && y + h == _realHeight) { +			glTexSubImage2D(GL_TEXTURE_2D, 0, x, y + h, +					w, 1, _glFormat, _glType, (const byte *)buf + pitch * (h - 1)); CHECK_GL_ERROR(); +		}  	}  } @@ -177,10 +211,10 @@ void GLTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {  	// Calculate the screen rect where the texture will be drawn  	const GLshort vertices[] = { -		x,      y, -		x + w,  y, -		x,      y + h, -		x + w,  y + h, +		x,                y, +		(GLshort)(x + w), y, +		x,                (GLshort)(y + h), +		(GLshort)(x + w), (GLshort)(y + h),  	};  	glVertexPointer(2, GL_SHORT, 0, vertices); CHECK_GL_ERROR(); diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index dce902d894..48e2663d44 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -902,7 +902,7 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat,  		bpp = 4;  		intFormat = GL_RGBA;  		glFormat = GL_RGBA; -		gltype = GL_UNSIGNED_BYTE; +		gltype = GL_UNSIGNED_INT_8_8_8_8;  	} else if (pixelFormat == Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0)) { // RGB888  		bpp = 3;  		intFormat = GL_RGB; @@ -918,11 +918,6 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat,  		intFormat = GL_RGBA;  		glFormat = GL_RGBA;  		gltype = GL_UNSIGNED_SHORT_5_5_5_1; -	} else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { // RGB555 -		bpp = 2; -		intFormat = GL_RGB; -		glFormat = GL_BGRA; -		gltype = GL_UNSIGNED_SHORT_1_5_5_5_REV;  	} else if (pixelFormat == Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0)) { // RGBA4444  		bpp = 2;  		intFormat = GL_RGBA; @@ -936,6 +931,13 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat,  		glFormat = GL_RGB;  		gltype = GL_UNSIGNED_BYTE;  #ifndef USE_GLES +	} else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { // RGB555 +		// GL_BGRA does not exist in every GLES implementation so should not be configured if +		// USE_GLES is set. +		bpp = 2; +		intFormat = GL_RGB; +		glFormat = GL_BGRA; +		gltype = GL_UNSIGNED_SHORT_1_5_5_5_REV;  	} else if (pixelFormat == Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24)) { // ARGB8888  		bpp = 4;  		intFormat = GL_RGBA; diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 67041ae17b..c5605cae87 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -460,6 +460,10 @@ void OpenGLSdlGraphicsManager::toggleFullScreen(int loop) {  			_activeFullscreenMode = -2;  			setFullscreenMode(!isFullscreen);  		} + +		// HACK: We need to force a refresh here, since we change the +		// fullscreen mode. +		_transactionDetails.needRefresh = true;  	endGFXTransaction();  	// Ignore resize events for the next 10 frames @@ -665,7 +669,7 @@ void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height)  void OpenGLSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) {  	adjustMousePosition(point.x, point.y);  } -  +  void OpenGLSdlGraphicsManager::notifyMousePos(Common::Point mouse) {  	setMousePosition(mouse.x, mouse.y);  } diff --git a/backends/graphics/openpandora/op-graphics.cpp b/backends/graphics/openpandora/op-graphics.cpp index 5f0301a0c8..f371081fde 100644 --- a/backends/graphics/openpandora/op-graphics.cpp +++ b/backends/graphics/openpandora/op-graphics.cpp @@ -26,28 +26,59 @@  #include "backends/graphics/openpandora/op-graphics.h"  #include "backends/events/openpandora/op-events.h" -//#include "backends/platform/openpandora/op-sdl.h"  #include "graphics/scaler/aspect.h"  #include "common/mutex.h"  #include "common/textconsole.h" +static SDL_Cursor *hiddenCursor; +  OPGraphicsManager::OPGraphicsManager(SdlEventSource *sdlEventSource)  	: SurfaceSdlGraphicsManager(sdlEventSource) {  }  bool OPGraphicsManager::loadGFXMode() { -	/* FIXME: For now we just cheat and set the overlay to 640*480 not 800*480 and let SDL -	   deal with the boarders (it saves cleaning up the overlay when the game screen is -	   smaller than the overlay ;) + +	uint8_t hiddenCursorData = 0; +	hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); + +	/* On the OpenPandora we need to work around an SDL assumption that +	   returns relative mouse coordinates when you get to the screen +	   edges using the touchscreen. The workaround is to set a blank +	   SDL cursor and not disable it (Hackish I know). + +	   The root issues likes in the Windows Manager GRAB code in SDL. +	   That is why the issue is not seen on framebuffer devices like the +	   GP2X (there is no X window manager ;)).  	*/ -	_videoMode.overlayWidth = 640; -	_videoMode.overlayHeight = 480; +	SDL_ShowCursor(SDL_ENABLE); +	SDL_SetCursor(hiddenCursor); +  	_videoMode.fullscreen = true; +	_videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor; +	_videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor; +  	if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400)  		_videoMode.aspectRatioCorrection = false; +	if (_videoMode.aspectRatioCorrection) +		_videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight); + +	_videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor; +	_videoMode.hardwareHeight = effectiveScreenHeight(); +  	return SurfaceSdlGraphicsManager::loadGFXMode();  } +void OPGraphicsManager::unloadGFXMode() { + +	uint8_t hiddenCursorData = 0; +	hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); + +	// Free the hidden SDL cursor created in loadGFXMode +	SDL_FreeCursor(hiddenCursor); + +	SurfaceSdlGraphicsManager::unloadGFXMode(); +} +  #endif diff --git a/backends/graphics/openpandora/op-graphics.h b/backends/graphics/openpandora/op-graphics.h index 0b3eeae8ec..2e3d63e3ad 100644 --- a/backends/graphics/openpandora/op-graphics.h +++ b/backends/graphics/openpandora/op-graphics.h @@ -24,7 +24,6 @@  #define BACKENDS_GRAPHICS_OP_H  #include "backends/graphics/surfacesdl/surfacesdl-graphics.h" -#include "graphics/scaler/aspect.h" // for aspect2Real  #include "graphics/scaler/downscaler.h"  enum { @@ -35,28 +34,8 @@ class OPGraphicsManager : public SurfaceSdlGraphicsManager {  public:  	OPGraphicsManager(SdlEventSource *sdlEventSource); -//	bool hasFeature(OSystem::Feature f); -//	void setFeatureState(OSystem::Feature f, bool enable); -//	bool getFeatureState(OSystem::Feature f); -//	int getDefaultGraphicsMode() const; - -//	void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL); -//	const OSystem::GraphicsMode *getSupportedGraphicsModes() const; -//	bool setGraphicsMode(const char *name); -//	bool setGraphicsMode(int mode); -//	void setGraphicsModeIntern(); -//	void internUpdateScreen(); -//	void showOverlay(); -//	void hideOverlay();  	bool loadGFXMode(); -//	void drawMouse(); -//	void undrawMouse(); -//	virtual void warpMouse(int x, int y); - -//	SurfaceSdlGraphicsManager::MousePos *getMouseCurState(); -//	SurfaceSdlGraphicsManager::VideoState *getVideoMode(); - -//	virtual void adjustMouseEvent(const Common::Event &event); +	void unloadGFXMode();  };  #endif /* BACKENDS_GRAPHICS_OP_H */ diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index fb964d6951..02e58ab319 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -968,7 +968,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {  	// If the shake position changed, fill the dirty area with blackness  	if (_currentShakePos != _newShakePos ||  		(_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) { -		SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor}; +		SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_newShakePos * _videoMode.scaleFactor)};  		if (_videoMode.aspectRatioCorrection && !_overlayVisible)  			blackrect.h = real2Aspect(blackrect.h - 1) + 1; diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 43c801287d..94262d0d92 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -172,10 +172,15 @@ int MidiDriver_CORE::open() {  	// Load custom soundfont, if specified  	if (ConfMan.hasKey("soundfont")) { -		FSRef	fsref; -		FSSpec	fsSpec;  		const char *soundfont = ConfMan.get("soundfont").c_str(); +		// TODO: We should really check whether the file contains an +		// actual soundfont... + +#if USE_DEPRECATED_COREAUDIO_API +		// Before 10.5, we need to use kMusicDeviceProperty_SoundBankFSSpec +		FSRef	fsref; +		FSSpec	fsSpec;  		err = FSPathMakeRef ((const byte *)soundfont, &fsref, NULL);  		if (err == noErr) { @@ -183,8 +188,6 @@ int MidiDriver_CORE::open() {  		}  		if (err == noErr) { -			// TODO: We should really check here whether the file contains an -			// actual soundfont...  			err = AudioUnitSetProperty (  				_synth,  				kMusicDeviceProperty_SoundBankFSSpec, kAudioUnitScope_Global, @@ -192,9 +195,27 @@ int MidiDriver_CORE::open() {  				&fsSpec, sizeof(fsSpec)  			);  		} +#else +		// kMusicDeviceProperty_SoundBankFSSpec is present on 10.6+, but broken +		// kMusicDeviceProperty_SoundBankURL was added in 10.5 as a replacement +		CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)soundfont, strlen(soundfont), false); + +		if (url) { +			err = AudioUnitSetProperty ( +				_synth, +				kMusicDeviceProperty_SoundBankURL, kAudioUnitScope_Global, +				0, +				&url, sizeof(url) +			); + +			CFRelease(url); +		} else { +			warning("Failed to allocate CFURLRef from '%s'", soundfont); +		} +#endif  		if (err != noErr) -			warning("Failed loading custom sound font '%s' (error %ld)\n", soundfont, (long)err); +			error("Failed loading custom sound font '%s' (error %ld)", soundfont, (long)err);  	}  #ifdef COREAUDIO_DISABLE_REVERB diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index 4efad9ceae..d48b80c40b 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -90,9 +90,9 @@ int MidiDriver_SEQ::open() {  	if ((device_name == NULL) || (device < 0)) {  		if (device_name == NULL) -			warning("Opening /dev/null (no music will be heard) "); +			warning("Opening /dev/null (no music will be heard)");  		else -			warning("Cannot open rawmidi device %s - using /dev/null (no music will be heard) ", +			warning("Cannot open rawmidi device %s - using /dev/null (no music will be heard)",  							device_name);  		device = (::open(("/dev/null"), O_RDWR, 0));  		if (device < 0) @@ -145,7 +145,7 @@ void MidiDriver_SEQ::send(uint32 b) {  		buf[position++] = 0;  		break;  	default: -		warning("MidiDriver_SEQ::send: unknown : %08x", (int)b); +		warning("MidiDriver_SEQ::send: unknown: %08x", (int)b);  		break;  	}  	if (write(device, buf, position) == -1) diff --git a/backends/midi/sndio.cpp b/backends/midi/sndio.cpp index 21c9ea4fec..a065a658e1 100644 --- a/backends/midi/sndio.cpp +++ b/backends/midi/sndio.cpp @@ -81,7 +81,7 @@ void MidiDriver_Sndio::send(uint32 b) {  	if (!hdl)  		return; -	buf[0] = b & 0xff;	 +	buf[0] = b & 0xff;  	buf[1] = (b >> 8) & 0xff;  	buf[2] = (b >> 16) & 0xff;  	buf[3] = (b >> 24) & 0xff; @@ -101,7 +101,7 @@ void MidiDriver_Sndio::send(uint32 b) {  void MidiDriver_Sndio::sysEx(const byte *msg, uint16 length) {  	if (!hdl)  		return; -	 +  	unsigned char buf[266];  	assert(length + 2 <= ARRAYSIZE(buf)); diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp index 001309a777..3c79290b50 100644 --- a/backends/mixer/sdl/sdl-mixer.cpp +++ b/backends/mixer/sdl/sdl-mixer.cpp @@ -153,7 +153,7 @@ void SdlMixerManager::suspendAudio() {  int SdlMixerManager::resumeAudio() {  	if (!_audioSuspended)  		return -2; -	if (SDL_OpenAudio(&_obtained, NULL) < 0){ +	if (SDL_OpenAudio(&_obtained, NULL) < 0) {  		return -1;  	}  	SDL_PauseAudio(0); diff --git a/backends/mixer/sdl13/sdl13-mixer.cpp b/backends/mixer/sdl13/sdl13-mixer.cpp index 84777c8bab..24d3434fde 100644 --- a/backends/mixer/sdl13/sdl13-mixer.cpp +++ b/backends/mixer/sdl13/sdl13-mixer.cpp @@ -69,13 +69,13 @@ void Sdl13MixerManager::init() {  		warning("Could not open audio device: %s", SDL_GetError());  		_mixer = new Audio::MixerImpl(g_system, desired.freq); -		assert(_mixer);  +		assert(_mixer);  		_mixer->setReady(false);  	} else {  		debug(1, "Output sample rate: %d Hz", _obtained.freq);  		_mixer = new Audio::MixerImpl(g_system, _obtained.freq); -		assert(_mixer);  +		assert(_mixer);  		_mixer->setReady(true);  		startAudio(); diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index 4b13ca4b0f..5f2f40b726 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -234,7 +234,7 @@ private:  	int _fingersDown;  	void clipMouse(Common::Point &p); -	void scaleMouse(Common::Point &p, int x, int y, bool deductDrawRect = true); +	void scaleMouse(Common::Point &p, int x, int y, bool deductDrawRect = true, bool touchpadMode = false);  	void updateEventScale();  	void disableCursorPalette(); diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk index 9292a16595..f498c671de 100644 --- a/backends/platform/android/android.mk +++ b/backends/platform/android/android.mk @@ -10,6 +10,7 @@ JAVA_FILES = \  	ScummVMApplication.java \  	ScummVMActivity.java \  	EditableSurfaceView.java \ +	MouseHelper.java \  	Unpacker.java  JAVA_FILES_PLUGIN = \ @@ -47,15 +48,9 @@ APKBUILDER = $(ANDROID_SDK)/tools/apkbuilder  JAVAC ?= javac  JAVACFLAGS = -source 1.5 -target 1.5 -# This is a bit silly.  I want to compile against the 1.6 android.jar, -# to make the compiler check that I don't use something that requires -# a newer Android.  However, in order to use android:installLocation, -# we need to give aapt a version >=8 android.jar - even though the -# result will work ok on 1.5+. -ANDROID_JAR = $(ANDROID_SDK)/platforms/android-4/android.jar -ANDROID_JAR8 = $(ANDROID_SDK)/platforms/android-8/android.jar +ANDROID_JAR = $(ANDROID_SDK)/platforms/android-14/android.jar -PATH_BUILD = build.tmp +PATH_BUILD = ./build.tmp  PATH_BUILD_ASSETS = $(PATH_BUILD)/assets  PATH_BUILD_CLASSES_MAIN_TOP = $(PATH_BUILD)/classes.main  PATH_BUILD_CLASSES_PLUGIN_TOP = $(PATH_BUILD)/classes.plugin @@ -92,9 +87,9 @@ $(FILE_MANIFEST): $(FILE_MANIFEST_SRC)  	@$(MKDIR) -p $(@D)  	sed "s/@ANDROID_VERSIONCODE@/$(ANDROID_VERSIONCODE)/" < $< > $@ -$(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR8) +$(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR)  	@$(MKDIR) -p $(PATH_GEN_TOP) -	$(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR8) +	$(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR)  $(PATH_CLASSES_MAIN)/%.class: $(PATH_GEN)/%.java $(SRC_GEN)  	@$(MKDIR) -p $(@D) @@ -127,13 +122,13 @@ $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png: $(PATH_RESOURCES)/drawable/scum  	@$(MKDIR) -p $(@D)  	$(CP) $< $@ -$(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR8) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) +$(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA)  	$(INSTALL) -d $(PATH_BUILD_ASSETS)  	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(PATH_BUILD_ASSETS)/  	work_dir=`pwd`; \  	for i in $(PATH_BUILD_ASSETS)/*.zip; do \  		echo "recompress $$i"; \ -		cd $$work_dir; \ +		cd "$$work_dir"; \  		$(RM) -rf $(PATH_BUILD_ASSETS)/tmp; \  		$(MKDIR) $(PATH_BUILD_ASSETS)/tmp; \  		unzip -q $$i -d $(PATH_BUILD_ASSETS)/tmp; \ @@ -141,10 +136,10 @@ $(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR8) $(DIST_FIL  		zip -r ../`basename $$i` *; \  	done  	@$(RM) -rf $(PATH_BUILD_ASSETS)/tmp -	$(AAPT) package -f -0 zip -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR8) -F $@ +	$(AAPT) package -f -0 zip -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR) -F $@ -$(PATH_BUILD)/%/$(FILE_RESOURCES): $(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png plugins/lib%.so $(ANDROID_JAR8) -	$(AAPT) package -f -M $< -S $(PATH_STAGE_PREFIX).$*/res -I $(ANDROID_JAR8) -F $@ +$(PATH_BUILD)/%/$(FILE_RESOURCES): $(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png plugins/lib%.so $(ANDROID_JAR) +	$(AAPT) package -f -M $< -S $(PATH_STAGE_PREFIX).$*/res -I $(ANDROID_JAR) -F $@  # Package installer won't delete old libscummvm.so on upgrade so  # replace it with a zero size file diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp index 21d2344fa7..db1261e432 100644 --- a/backends/platform/android/events.cpp +++ b/backends/platform/android/events.cpp @@ -59,6 +59,11 @@ enum {  	JE_DOUBLE_TAP = 6,  	JE_MULTI = 7,  	JE_BALL = 8, +	JE_LMB_DOWN = 9, +	JE_LMB_UP = 10, +	JE_RMB_DOWN = 11, +	JE_RMB_UP = 12, +	JE_MOUSE_MOVE = 13,  	JE_QUIT = 0x1000  }; @@ -272,7 +277,7 @@ void OSystem_Android::clipMouse(Common::Point &p) {  }  void OSystem_Android::scaleMouse(Common::Point &p, int x, int y, -									bool deductDrawRect) { +									bool deductDrawRect, bool touchpadMode) {  	const GLESBaseTexture *tex;  	if (_show_overlay) @@ -282,7 +287,7 @@ void OSystem_Android::scaleMouse(Common::Point &p, int x, int y,  	const Common::Rect &r = tex->getDrawRect(); -	if (_touchpad_mode) { +	if (touchpadMode) {  		x = x * 100 / _touchpad_scale;  		y = y * 100 / _touchpad_scale;  	} @@ -327,11 +332,16 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,  		}  		switch (arg2) { + +		// special case. we'll only get it's up event  		case JKEYCODE_BACK:  			e.kbd.keycode = Common::KEYCODE_ESCAPE;  			e.kbd.ascii = Common::ASCII_ESCAPE;  			lockMutex(_event_queue_lock); +			e.type = Common::EVENT_KEYDOWN; +			_event_queue.push(e); +			e.type = Common::EVENT_KEYUP;  			_event_queue.push(e);  			unlockMutex(_event_queue_lock); @@ -554,7 +564,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,  			}  			scaleMouse(e.mouse, arg3 - _touch_pt_scroll.x, -						arg4 - _touch_pt_scroll.y, false); +						arg4 - _touch_pt_scroll.y, false, true);  			e.mouse += _touch_pt_down;  			clipMouse(e.mouse);  		} else { @@ -652,7 +662,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,  				if (_touchpad_mode) {  					scaleMouse(e.mouse, arg1 - _touch_pt_dt.x, -								arg2 - _touch_pt_dt.y, false); +								arg2 - _touch_pt_dt.y, false, true);  					e.mouse += _touch_pt_down;  					clipMouse(e.mouse); @@ -757,6 +767,66 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,  		return; +	case JE_MOUSE_MOVE: +		e.type = Common::EVENT_MOUSEMOVE; + +		scaleMouse(e.mouse, arg1, arg2); +		clipMouse(e.mouse); + +		lockMutex(_event_queue_lock); +		_event_queue.push(e); +		unlockMutex(_event_queue_lock); + +		return; + +	case JE_LMB_DOWN: +		e.type = Common::EVENT_LBUTTONDOWN; + +		scaleMouse(e.mouse, arg1, arg2); +		clipMouse(e.mouse); + +		lockMutex(_event_queue_lock); +		_event_queue.push(e); +		unlockMutex(_event_queue_lock); + +		return; + +	case JE_LMB_UP: +		e.type = Common::EVENT_LBUTTONUP; + +		scaleMouse(e.mouse, arg1, arg2); +		clipMouse(e.mouse); + +		lockMutex(_event_queue_lock); +		_event_queue.push(e); +		unlockMutex(_event_queue_lock); + +		return; + +	case JE_RMB_DOWN: +		e.type = Common::EVENT_RBUTTONDOWN; + +		scaleMouse(e.mouse, arg1, arg2); +		clipMouse(e.mouse); + +		lockMutex(_event_queue_lock); +		_event_queue.push(e); +		unlockMutex(_event_queue_lock); + +		return; + +	case JE_RMB_UP: +		e.type = Common::EVENT_RBUTTONUP; + +		scaleMouse(e.mouse, arg1, arg2); +		clipMouse(e.mouse); + +		lockMutex(_event_queue_lock); +		_event_queue.push(e); +		unlockMutex(_event_queue_lock); + +		return; +  	case JE_QUIT:  		e.type = Common::EVENT_QUIT; diff --git a/backends/platform/android/org/scummvm/scummvm/MouseHelper.java b/backends/platform/android/org/scummvm/scummvm/MouseHelper.java new file mode 100644 index 0000000000..999815593f --- /dev/null +++ b/backends/platform/android/org/scummvm/scummvm/MouseHelper.java @@ -0,0 +1,129 @@ +package org.scummvm.scummvm; + +import android.view.InputDevice; +import android.view.MotionEvent; +import android.view.SurfaceView; +import android.view.View; + +/** + * Contains helper methods for mouse/hover events that were introduced in Android 4.0. + */ +public class MouseHelper { +	private View.OnHoverListener _listener; +	private ScummVM _scummvm; +	private long _rmbGuardTime; +	private boolean _rmbPressed; +	private boolean _lmbPressed; + +	/** +	 * Class initialization fails when this throws an exception. +	 * Checking hover availability is done on static class initialization for Android 1.6 compatibility. +	 */ +	static { +		try { +			Class.forName("android.view.View$OnHoverListener"); +		} catch (Exception ex) { +			throw new RuntimeException(ex); +		} +	} + +	/** +	 * Calling this forces class initialization +	 */ +	public static void checkHoverAvailable() {} + +	public MouseHelper(ScummVM scummvm) { +		_scummvm = scummvm; +		_listener = createListener(); +	} + +	private View.OnHoverListener createListener() { +		return new View.OnHoverListener() { +			@Override +			public boolean onHover(View view, MotionEvent e) { +				return onMouseEvent(e, true); +			} +		}; +	} + +	public void attach(SurfaceView main_surface) { +		main_surface.setOnHoverListener(_listener); +	} + +	public static boolean isMouse(MotionEvent e) { +		if (e == null) { +			return false; +		} + +		InputDevice device = e.getDevice(); + +		if (device == null) { +			return false; +		} + +		int sources = device.getSources(); + +		return ((sources & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) || +		       ((sources & InputDevice.SOURCE_STYLUS) == InputDevice.SOURCE_STYLUS) || +		       ((sources & InputDevice.SOURCE_TOUCHPAD) == InputDevice.SOURCE_TOUCHPAD); +	} + +	public boolean onMouseEvent(MotionEvent e, boolean hover) { +		_scummvm.pushEvent(ScummVMEvents.JE_MOUSE_MOVE, (int)e.getX(), (int)e.getY(), 0, 0, 0); +		 +		int buttonState = e.getButtonState(); + +		boolean lmbDown = (buttonState & MotionEvent.BUTTON_PRIMARY) == MotionEvent.BUTTON_PRIMARY; + +		if (!hover && e.getAction() != MotionEvent.ACTION_UP && buttonState == 0) { +			// On some device types, ButtonState is 0 even when tapping on the touchpad or using the stylus on the screen etc. +			lmbDown = true; +		} + +		if (lmbDown) { +			if (!_lmbPressed) { +				// left mouse button was pressed just now +				_scummvm.pushEvent(ScummVMEvents.JE_LMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); +			} + +			_lmbPressed = true; +		} else { +			if (_lmbPressed) { +				// left mouse button was released just now +				_scummvm.pushEvent(ScummVMEvents.JE_LMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); +			} + +			_lmbPressed = false; +		} + +		boolean rmbDown = (buttonState & MotionEvent.BUTTON_SECONDARY) == MotionEvent.BUTTON_SECONDARY; +		if (rmbDown) { +			if (!_rmbPressed) { +				// right mouse button was pressed just now +				_scummvm.pushEvent(ScummVMEvents.JE_RMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); +			} + +			_rmbPressed = true; +		} else { +			if (_rmbPressed) { +				// right mouse button was released just now +				_scummvm.pushEvent(ScummVMEvents.JE_RMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0); +				_rmbGuardTime = System.currentTimeMillis(); +			} + +			_rmbPressed = false; +		} + +		return true; +	} + +	/** +	 * Checks whether right mouse button is pressed or was pressed just previously. This is used to prevent sending +	 * extra back key on right mouse click which is the default behaviour in some platforms. +	 * +	 * @return true if right mouse button is (or was in the last 200ms) pressed +	 */ +	public boolean getRmbGuard() { +		return _rmbPressed || _rmbGuardTime + 200 > System.currentTimeMillis(); +	} +} diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java index fbd6513761..829a948435 100644 --- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java +++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java @@ -18,6 +18,18 @@ import java.io.File;  public class ScummVMActivity extends Activity { +	/* Establish whether the hover events are available */ +	private static boolean _hoverAvailable; + +	static { +		try { +			MouseHelper.checkHoverAvailable(); // this throws exception if we're on too old version +			_hoverAvailable = true; +		} catch (Throwable t) { +			_hoverAvailable = false; +		} +	} +  	private class MyScummVM extends ScummVM {  		private boolean usingSmallScreen() {  			// Multiple screen sizes came in with Android 1.6.  Have @@ -94,6 +106,7 @@ public class ScummVMActivity extends Activity {  	private MyScummVM _scummvm;  	private ScummVMEvents _events; +	private MouseHelper _mouseHelper;  	private Thread _scummvm_thread;  	@Override @@ -147,11 +160,16 @@ public class ScummVMActivity extends Activity {  			"ScummVM",  			"--config=" + getFileStreamPath("scummvmrc").getPath(),  			"--path=" + Environment.getExternalStorageDirectory().getPath(), -			"--gui-theme=scummmodern",  			"--savepath=" + savePath  		}); -		_events = new ScummVMEvents(this, _scummvm); +		Log.d(ScummVM.LOG_TAG, "Hover available: " + _hoverAvailable); +		if (_hoverAvailable) { +			_mouseHelper = new MouseHelper(_scummvm); +			_mouseHelper.attach(main_surface); +		} + +		_events = new ScummVMEvents(this, _scummvm, _mouseHelper);  		main_surface.setOnKeyListener(_events);  		main_surface.setOnTouchListener(_events); diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java index 86227b9352..5f51ffac6c 100644 --- a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java +++ b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java @@ -2,7 +2,6 @@ package org.scummvm.scummvm;  import android.os.Handler;  import android.os.Message; -import android.util.Log;  import android.content.Context;  import android.view.KeyEvent;  import android.view.KeyCharacterMap; @@ -27,16 +26,23 @@ public class ScummVMEvents implements  	public static final int JE_DOUBLE_TAP = 6;  	public static final int JE_MULTI = 7;  	public static final int JE_BALL = 8; +	public static final int JE_LMB_DOWN = 9; +	public static final int JE_LMB_UP = 10; +	public static final int JE_RMB_DOWN = 11; +	public static final int JE_RMB_UP = 12; +	public static final int JE_MOUSE_MOVE = 13;  	public static final int JE_QUIT = 0x1000;  	final protected Context _context;  	final protected ScummVM _scummvm;  	final protected GestureDetector _gd;  	final protected int _longPress; +	final protected MouseHelper _mouseHelper; -	public ScummVMEvents(Context context, ScummVM scummvm) { +	public ScummVMEvents(Context context, ScummVM scummvm, MouseHelper mouseHelper) {  		_context = context;  		_scummvm = scummvm; +		_mouseHelper = mouseHelper;  		_gd = new GestureDetector(context, this);  		_gd.setOnDoubleTapListener(this); @@ -64,7 +70,7 @@ public class ScummVMEvents implements  		public void handleMessage(Message msg) {  			if (msg.what == MSG_MENU_LONG_PRESS) {  				InputMethodManager imm = (InputMethodManager) -					_context.getSystemService(_context.INPUT_METHOD_SERVICE); +					_context.getSystemService(Context.INPUT_METHOD_SERVICE);  				if (imm != null)  					imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); @@ -73,9 +79,30 @@ public class ScummVMEvents implements  	};  	// OnKeyListener +	@Override  	final public boolean onKey(View v, int keyCode, KeyEvent e) {  		final int action = e.getAction(); +		if (keyCode == 238) { +			// this (undocumented) event is sent when ACTION_HOVER_ENTER or ACTION_HOVER_EXIT occurs +			return false; +		} + +		if (keyCode == KeyEvent.KEYCODE_BACK) { +			if (action != KeyEvent.ACTION_UP) { +				// only send event from back button on up event, since down event is sent on right mouse click and +				// cannot be caught (thus rmb click would send escape key first) +				return true; +			} + +			if (_mouseHelper != null) { +				if (_mouseHelper.getRmbGuard()) { +					// right mouse button was just clicked which sends an extra back button press +					return true; +				} +			} +		} +  		if (e.isSystem()) {  			// filter what we handle  			switch (keyCode) { @@ -160,7 +187,16 @@ public class ScummVMEvents implements  	}  	// OnTouchListener +	@Override  	final public boolean onTouch(View v, MotionEvent e) { +		if (_mouseHelper != null) { +			boolean isMouse = MouseHelper.isMouse(e); +			if (isMouse) { +				// mouse button is pressed +				return _mouseHelper.onMouseEvent(e, false); +			} +		} +  		final int action = e.getAction();  		// constants from APIv5: @@ -177,11 +213,13 @@ public class ScummVMEvents implements  	}  	// OnGestureListener +	@Override  	final public boolean onDown(MotionEvent e) {  		_scummvm.pushEvent(JE_DOWN, (int)e.getX(), (int)e.getY(), 0, 0, 0);  		return true;  	} +	@Override  	final public boolean onFling(MotionEvent e1, MotionEvent e2,  									float velocityX, float velocityY) {  		//Log.d(ScummVM.LOG_TAG, String.format("onFling: %s -> %s (%.3f %.3f)", @@ -191,10 +229,12 @@ public class ScummVMEvents implements  		return true;  	} +	@Override  	final public void onLongPress(MotionEvent e) {  		// disabled, interferes with drag&drop  	} +	@Override  	final public boolean onScroll(MotionEvent e1, MotionEvent e2,  									float distanceX, float distanceY) {  		_scummvm.pushEvent(JE_SCROLL, (int)e1.getX(), (int)e1.getY(), @@ -203,9 +243,11 @@ public class ScummVMEvents implements  		return true;  	} +	@Override  	final public void onShowPress(MotionEvent e) {  	} +	@Override  	final public boolean onSingleTapUp(MotionEvent e) {  		_scummvm.pushEvent(JE_TAP, (int)e.getX(), (int)e.getY(),  							(int)(e.getEventTime() - e.getDownTime()), 0, 0); @@ -214,10 +256,12 @@ public class ScummVMEvents implements  	}  	// OnDoubleTapListener +	@Override  	final public boolean onDoubleTap(MotionEvent e) {  		return true;  	} +	@Override  	final public boolean onDoubleTapEvent(MotionEvent e) {  		_scummvm.pushEvent(JE_DOUBLE_TAP, (int)e.getX(), (int)e.getY(),  							e.getAction(), 0, 0); @@ -225,6 +269,7 @@ public class ScummVMEvents implements  		return true;  	} +	@Override  	final public boolean onSingleTapConfirmed(MotionEvent e) {  		return true;  	} diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp index 95c96e0d25..b174e93191 100644 --- a/backends/platform/android/texture.cpp +++ b/backends/platform/android/texture.cpp @@ -52,9 +52,6 @@  // Supported GL extensions  static bool npot_supported = false; -#ifdef GL_OES_draw_texture -static bool draw_tex_supported = false; -#endif  static inline GLfixed xdiv(int numerator, int denominator) {  	assert(numerator < (1 << 16)); @@ -85,11 +82,6 @@ void GLESBaseTexture::initGLExtensions() {  		if (token == "GL_ARB_texture_non_power_of_two")  			npot_supported = true; - -#ifdef GL_OES_draw_texture -		if (token == "GL_OES_draw_texture") -			draw_tex_supported = true; -#endif  	}  } @@ -180,45 +172,28 @@ void GLESBaseTexture::allocBuffer(GLuint w, GLuint h) {  void GLESBaseTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {  	GLCALL(glBindTexture(GL_TEXTURE_2D, _texture_name)); -#ifdef GL_OES_draw_texture -	// Great extension, but only works under specific conditions. -	// Still a work-in-progress - disabled for now. -	if (false && draw_tex_supported && !hasPalette()) { -		//GLCALL(glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE)); -		const GLint crop[4] = { 0, _surface.h, _surface.w, -_surface.h }; +	const GLfixed tex_width = xdiv(_surface.w, _texture_width); +	const GLfixed tex_height = xdiv(_surface.h, _texture_height); +	const GLfixed texcoords[] = { +		0, 0, +		tex_width, 0, +		0, tex_height, +		tex_width, tex_height, +	}; -		GLCALL(glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop)); +	GLCALL(glTexCoordPointer(2, GL_FIXED, 0, texcoords)); -		// Android GLES bug? -		GLCALL(glColor4ub(0xff, 0xff, 0xff, 0xff)); +	const GLshort vertices[] = { +		x, y, +		x + w, y, +		x, y + h, +		x + w, y + h, +	}; -		GLCALL(glDrawTexiOES(x, y, 0, w, h)); -	} else -#endif -	{ -		const GLfixed tex_width = xdiv(_surface.w, _texture_width); -		const GLfixed tex_height = xdiv(_surface.h, _texture_height); -		const GLfixed texcoords[] = { -			0, 0, -			tex_width, 0, -			0, tex_height, -			tex_width, tex_height, -		}; - -		GLCALL(glTexCoordPointer(2, GL_FIXED, 0, texcoords)); - -		const GLshort vertices[] = { -			x, y, -			x + w, y, -			x, y + h, -			x + w, y + h, -		}; - -		GLCALL(glVertexPointer(2, GL_SHORT, 0, vertices)); - -		assert(ARRAYSIZE(vertices) == ARRAYSIZE(texcoords)); -		GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, ARRAYSIZE(vertices) / 2)); -	} +	GLCALL(glVertexPointer(2, GL_SHORT, 0, vertices)); + +	assert(ARRAYSIZE(vertices) == ARRAYSIZE(texcoords)); +	GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, ARRAYSIZE(vertices) / 2));  	clearDirty();  } diff --git a/backends/platform/bada/application.cpp b/backends/platform/bada/application.cpp index ba8e544983..e761649245 100644 --- a/backends/platform/bada/application.cpp +++ b/backends/platform/bada/application.cpp @@ -103,7 +103,7 @@ void BadaScummVM::pauseGame(bool pause) {  		if (pause && g_engine && !g_engine->isPaused()) {  			_appForm->pushKey(Common::KEYCODE_SPACE);  		} -		 +  		if (g_system) {  			((BadaSystem *)g_system)->setMute(pause);  		} diff --git a/backends/platform/bada/sscanf.cpp b/backends/platform/bada/sscanf.cpp index b5e5b88cb5..aa846698f6 100644 --- a/backends/platform/bada/sscanf.cpp +++ b/backends/platform/bada/sscanf.cpp @@ -56,7 +56,7 @@ bool scanInt(const char **in, va_list *ap, int max) {  	bool err = false;  	if (end == *in || (max > 0 && (end - *in) > max)) { -		err = true;  +		err = true;  	} else {  		*arg = (int)n;  		*in = end; diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp index 49a1edf411..485780b472 100644 --- a/backends/platform/gph/gph-backend.cpp +++ b/backends/platform/gph/gph-backend.cpp @@ -20,6 +20,8 @@   *   */ +#if defined(GPH_DEVICE) +  // Disable symbol overrides so that we can use system headers.  #define FORBIDDEN_SYMBOL_ALLOW_ALL @@ -32,8 +34,6 @@  #include "backends/saves/default/default-saves.h"  #include "backends/timer/default/default-timer.h" -#include "base/main.h" -  #include "common/archive.h"  #include "common/config-manager.h"  #include "common/debug.h" @@ -64,23 +64,6 @@ void OSystem_GPH::initBackend() {  	assert(!_inited); -	// Create the events manager -	if (_eventSource == 0) -		_eventSource = new GPHEventSource(); - -	// Create the graphics manager -	if (_graphicsManager == 0) { -		_graphicsManager = new GPHGraphicsManager(_eventSource); -	} - -	// Create the mixer manager -	if (_mixer == 0) { -		_mixerManager = new DoubleBufferSDLMixerManager(); - -		// Setup and start mixer -		_mixerManager->init(); -	} -  	/* Setup default save path to be workingdir/saves */  	char savePath[PATH_MAX+1]; @@ -165,16 +148,42 @@ void OSystem_GPH::initBackend() {  	/* Make sure that aspect ratio correction is enabled on the 1st run to stop  	   users asking me what the 'wasted space' at the bottom is ;-). */  	ConfMan.registerDefault("aspect_ratio", true); +	ConfMan.registerDefault("fullscreen", true);  	/* Make sure SDL knows that we have a joystick we want to use. */  	ConfMan.setInt("joystick_num", 0); +	// Create the events manager +	if (_eventSource == 0) +		_eventSource = new GPHEventSource(); + +	// Create the graphics manager +	if (_graphicsManager == 0) { +		_graphicsManager = new GPHGraphicsManager(_eventSource); +	} +  	/* Pass to POSIX method to do the heavy lifting */  	OSystem_POSIX::initBackend();  	_inited = true;  } +void OSystem_GPH::initSDL() { +	// Check if SDL has not been initialized +	if (!_initedSDL) { + +		uint32 sdlFlags = SDL_INIT_EVENTTHREAD; +		if (ConfMan.hasKey("disable_sdl_parachute")) +			sdlFlags |= SDL_INIT_NOPARACHUTE; + +		// Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers) +		if (SDL_Init(sdlFlags) == -1) +			error("Could not initialize SDL: %s", SDL_GetError()); + +		_initedSDL = true; +	} +} +  void OSystem_GPH::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {  	/* Setup default extra data paths for engine data files and plugins */ @@ -222,3 +231,5 @@ void OSystem_GPH::quit() {  	OSystem_POSIX::quit();  } + +#endif diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp index 2c43af151f..876de0f358 100644 --- a/backends/platform/gph/gph-main.cpp +++ b/backends/platform/gph/gph-main.cpp @@ -21,7 +21,7 @@   */  #include "backends/platform/gph/gph.h" -#include "backends/plugins/posix/posix-provider.h" +#include "backends/plugins/sdl/sdl-provider.h"  #include "base/main.h"  #if defined(GPH_DEVICE) @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {  	((OSystem_GPH *)g_system)->init();  #ifdef DYNAMIC_MODULES -	PluginManager::instance().addPluginProvider(new POSIXPluginProvider()); +	PluginManager::instance().addPluginProvider(new SDLPluginProvider());  #endif  	// Invoke the actual ScummVM main entry point: diff --git a/backends/platform/gph/gph.h b/backends/platform/gph/gph.h index 80f43f0bab..90a798154f 100644 --- a/backends/platform/gph/gph.h +++ b/backends/platform/gph/gph.h @@ -26,13 +26,11 @@  #if defined(GPH_DEVICE)  #include "backends/base-backend.h" -#include "backends/platform/sdl/sdl.h" +#include "backends/platform/sdl/sdl-sys.h"  #include "backends/platform/sdl/posix/posix.h"  #include "backends/events/gph/gph-events.h"  #include "backends/graphics/gph/gph-graphics.h" -#define __GP2XWIZ__ -  #ifndef PATH_MAX  #define PATH_MAX 255  #endif @@ -45,6 +43,11 @@ public:  	void addSysArchivesToSearchSet(Common::SearchSet &s, int priority);  	void initBackend();  	void quit(); + +protected: +	bool _inited; +	bool _initedSDL; +	virtual void initSDL();  };  #endif diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm index 7877bc6430..0bfae30fc7 100644 --- a/backends/platform/iphone/iphone_video.mm +++ b/backends/platform/iphone/iphone_video.mm @@ -161,9 +161,9 @@ const char *iPhone_getDocumentsDir() {  - (id)initWithFrame:(struct CGRect)frame {  	self = [super initWithFrame: frame]; -	if ([[UIScreen mainScreen] respondsToSelector: NSSelectorFromString(@"scale")]) { -		if ([self respondsToSelector: NSSelectorFromString(@"contentScaleFactor")]) { -			//self.contentScaleFactor = [[UIScreen mainScreen] scale]; +	if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { +		if ([self respondsToSelector:@selector(setContentScaleFactor:)]) { +			[self setContentScaleFactor:[[UIScreen mainScreen] scale]];  		}  	} @@ -268,6 +268,11 @@ const char *iPhone_getDocumentsDir() {  	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); printOpenGLError();  	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); printOpenGLError(); +	// We use GL_CLAMP_TO_EDGE here to avoid artifacts when linear filtering +	// is used. If we would not use this for example the cursor in Loom would +	// have a line/border artifact on the right side of the covered rect. +	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); printOpenGLError(); +	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); printOpenGLError();  }  - (void)setGraphicsMode { @@ -476,7 +481,7 @@ const char *iPhone_getDocumentsDir() {  		else if (_videoContext.screenWidth == 640 && _videoContext.screenHeight == 400)  			adjustedHeight = 480;  	} -	 +  	float overlayPortraitRatio;  	if (_orientation == UIDeviceOrientationLandscapeLeft || _orientation ==  UIDeviceOrientationLandscapeRight) { diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp index f9b2a81ce6..ed2c886213 100644 --- a/backends/platform/iphone/osys_main.cpp +++ b/backends/platform/iphone/osys_main.cpp @@ -65,6 +65,10 @@ OSystem_IPHONE::OSystem_IPHONE() :  	_touchpadModeEnabled = !iPhone_isHighResDevice();  	_fsFactory = new POSIXFilesystemFactory();  	initVideoContext(); + +	memset(_gamePalette, 0, sizeof(_gamePalette)); +	memset(_gamePaletteRGBA5551, 0, sizeof(_gamePaletteRGBA5551)); +	memset(_mouseCursorPalette, 0, sizeof(_mouseCursorPalette));  }  OSystem_IPHONE::~OSystem_IPHONE() { diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm index aa1856490f..a11bf32c54 100644 --- a/backends/platform/iphone/osys_video.mm +++ b/backends/platform/iphone/osys_video.mm @@ -148,6 +148,11 @@ void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) {  	}  	dirtyFullScreen(); + +	// Automatically update the mouse texture when the palette changes while the +	// cursor palette is disabled. +	if (!_mouseCursorPaletteEnabled && _mouseBuffer.format.bytesPerPixel == 1) +		_mouseDirty = _mouseNeedTextureUpdate = true;  }  void OSystem_IPHONE::grabPalette(byte *colors, uint start, uint num) { @@ -353,7 +358,7 @@ void OSystem_IPHONE::copyRectToOverlay(const void *buf, int pitch, int x, int y,  	}  	byte *dst = (byte *)_videoContext->overlayTexture.getBasePtr(x, y); -	do {  +	do {  		memcpy(dst, src, w * sizeof(uint16));  		src += pitch;  		dst += _videoContext->overlayTexture.pitch; @@ -435,7 +440,7 @@ void OSystem_IPHONE::setCursorPalette(const byte *colors, uint start, uint num)  	for (uint i = start; i < start + num; ++i, colors += 3)  		_mouseCursorPalette[i] = Graphics::RGBToColor<Graphics::ColorMasks<5551> >(colors[0], colors[1], colors[2]); -	 +  	// FIXME: This is just stupid, our client code seems to assume that this  	// automatically enables the cursor palette.  	_mouseCursorPaletteEnabled = true; diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog index f3e4c4eadb..ea44574e96 100644 --- a/backends/platform/maemo/debian/changelog +++ b/backends/platform/maemo/debian/changelog @@ -8,7 +8,7 @@ scummvm (1.5.0) unstable; urgency=low    * 1.5.0 release - -- Tarek Soliman <tsoliman@scummvm.org>  Tue, 10 Jul 2012 22:57:32 -0500 + -- Tarek Soliman <tsoliman@scummvm.org>  Fri, 20 Jul 2012 14:48:44 -0500  scummvm (1.4.1) unstable; urgency=low diff --git a/backends/platform/maemo/debian/control b/backends/platform/maemo/debian/control index 6e1dfe2fd4..bdaccd2359 100644 --- a/backends/platform/maemo/debian/control +++ b/backends/platform/maemo/debian/control @@ -2,7 +2,7 @@ Source: scummvm  Section: user/games  Priority: optional  Maintainer: Tarek Soliman <tsoliman@scummvm.org> -Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev, libmad0-dev, libasound2-dev, libvorbisidec-dev, libmpeg2-4-dev, libflac-dev (>= 1.1.2), libz-dev, quilt +Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev, libmad0-dev, libasound2-dev, libvorbisidec-dev, libmpeg2-4-dev, libflac-dev (>= 1.1.2), libfreetype6-dev, libz-dev, quilt  Standards-Version: 3.6.1.1  Package: scummvm diff --git a/backends/platform/maemo/debian/rules b/backends/platform/maemo/debian/rules index 64add08de8..c713403876 100755 --- a/backends/platform/maemo/debian/rules +++ b/backends/platform/maemo/debian/rules @@ -47,10 +47,10 @@ install: build  	install -m0644 gui/themes/scummclassic.zip  gui/themes/scummmodern.zip debian/scummvm/opt/scummvm/share  	install -m0644 backends/vkeybd/packs/vkeybd_default.zip debian/scummvm/opt/scummvm/share  # for optified version we can also add engine datafiles -	install -m0644 dists/engine-data/drascula.dat dists/engine-data/hugo.dat dists/engine-data/kyra.dat dists/engine-data/lure.dat dists/engine-data/queen.tbl dists/engine-data/sky.cpt dists/engine-data/teenagent.dat dists/engine-data/toon.dat debian/scummvm/opt/scummvm/share +	install -m0644 dists/engine-data/drascula.dat dists/engine-data/hugo.dat dists/engine-data/kyra.dat dists/engine-data/lure.dat dists/engine-data/queen.tbl dists/engine-data/sky.cpt dists/engine-data/teenagent.dat dists/engine-data/tony.dat dists/engine-data/toon.dat debian/scummvm/opt/scummvm/share  	install -m0644 -d debian/scummvm/usr/share/doc/scummvm -	install -m0644 NEWS README COPYRIGHT debian/scummvm/usr/share/doc/scummvm +	install -m0644 AUTHORS COPYING COPYING.BSD COPYING.FREEFONT COPYING.LGPL COPYRIGHT NEWS README debian/scummvm/usr/share/doc/scummvm  binary: binary-arch  binary-arch: build install diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index e296d4787c..6bd229177b 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -43,6 +43,7 @@ namespace Maemo {  OSystem_SDL_Maemo::OSystem_SDL_Maemo()  	: +	_eventObserver(0),  	OSystem_POSIX() {  } @@ -84,6 +85,9 @@ static void registerDefaultKeyBindings(Common::KeymapperDefaultBindings *_keymap  #endif  void OSystem_SDL_Maemo::initBackend() { +	ConfMan.registerDefault("fullscreen", true); +	ConfMan.registerDefault("aspect_ratio", true); +  	// Create the events manager  	if (_eventSource == 0)  		_eventSource = new MaemoSdlEventSource(); @@ -180,6 +184,7 @@ void OSystem_SDL_Maemo::setupIcon() {  	// http://bugzilla.libsdl.org/show_bug.cgi?id=586  } +#ifdef ENABLE_KEYMAPPER  static const Common::KeyTableEntry maemoKeys[] = {  	// Function keys  	{"MENU", Common::KEYCODE_F11, 0, "Menu", false}, @@ -191,7 +196,6 @@ static const Common::KeyTableEntry maemoKeys[] = {  	{0, Common::KEYCODE_INVALID, 0, 0, false}  }; -#ifdef ENABLE_KEYMAPPER  Common::HardwareInputSet *OSystem_SDL_Maemo::getHardwareInputSet() {  	return new Common::HardwareInputSet(true, maemoKeys);  } diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index 249f72d8fc..bc6b3cb1a5 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -104,9 +104,7 @@ protected:  	bool _cursorPaletteDisabled;  	bool _dirtyPalette; -	// FIXME: This must be left as "int" for now, to fix the sign-comparison problem -	// there is a little more work involved than an int->uint change -	int _cursorWidth, _cursorHeight; +	uint _cursorWidth, _cursorHeight;  	int _cursorKeycolor; diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index 7d6f8f0b5c..1e2aca9e51 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -100,8 +100,8 @@ OSystem_N64::OSystem_N64() {  	_cursor_pal = NULL;  	_cursor_hic = NULL; -	_cursorWidth = -1; -	_cursorHeight = -1; +	_cursorWidth = 0; +	_cursorHeight = 0;  	_cursorKeycolor = -1;  	_mouseHotspotX = _mouseHotspotY = -1; @@ -575,19 +575,20 @@ void OSystem_N64::updateScreen() {  			horiz_pix_skip = skip_pixels;  		} -		int mX = _mouseX - _mouseHotspotX; -		int mY = _mouseY - _mouseHotspotY; +		for (uint h = 0; h < _cursorHeight; h++) { +			for (uint w = 0; w < _cursorWidth; w++) { +				int posX = (_mouseX - _mouseHotspotX) + w; +				int posY = (_mouseY - _mouseHotspotY) + h; -		for (int h = 0; h < _cursorHeight; h++) -			for (int w = 0; w < _cursorWidth; w++) {  				// Draw pixel -				if (((mY + h) >= 0) && ((mY + h) < _mouseMaxY) && ((mX + w) >= 0) && ((mX + w) < _mouseMaxX)) { +				if ((posY >= 0) && (posY < _mouseMaxY) && (posX >= 0) && (posX < _mouseMaxX)) {  					uint16 cursor_pixel_hic = _cursor_hic[(h * _cursorWidth) + w];  					if (!(cursor_pixel_hic & 0x00001)) -						mouse_framebuffer[((mY + h) * _frameBufferWidth) + ((mX + w) + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic; +						mouse_framebuffer[(posY * _frameBufferWidth) + (posX + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic;  				}  			} +		}  	}  #ifndef _ENABLE_DEBUG_ @@ -724,7 +725,7 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in  	uint16 *dst = _overlayBuffer + (y * _overlayWidth + x); -	if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) { +	if (_overlayWidth == (uint16)w && (uint16)pitch == _overlayWidth * sizeof(uint16)) {  		memcpy(dst, src, h * pitch);  	} else {  		do { diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp index dcec387f97..354aa24b24 100644 --- a/backends/platform/openpandora/op-backend.cpp +++ b/backends/platform/openpandora/op-backend.cpp @@ -54,53 +54,15 @@  /* Dump console info to files. */  #define DUMP_STDOUT -static SDL_Cursor *hiddenCursor; -  OSystem_OP::OSystem_OP()  	:  	OSystem_POSIX() {  } -//static Uint32 timer_handler(Uint32 interval, void *param) { -//	((DefaultTimerManager *)param)->handler(); -//	return interval; -//} -  void OSystem_OP::initBackend() {  	assert(!_inited); -	// Create the events manager -	if (_eventSource == 0) -		_eventSource = new OPEventSource(); - -	// Create the graphics manager -	if (_graphicsManager == 0) { -		_graphicsManager = new OPGraphicsManager(_eventSource); -	} - -//	int joystick_num = ConfMan.getInt("joystick_num"); -//	uint32 sdlFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; -// -//	if (ConfMan.hasKey("disable_sdl_parachute")) -//		sdlFlags |= SDL_INIT_NOPARACHUTE; -// -//	if (joystick_num > -1) -//		sdlFlags |= SDL_INIT_JOYSTICK; -// -//	if (SDL_Init(sdlFlags) == -1) { -//		error("Could not initialize SDL: %s", SDL_GetError()); -//	} -// - -	// Create the mixer manager -//	if (_mixer == 0) { -//		_mixerManager = new DoubleBufferSDLMixerManager(); - -	// Setup and start mixer -//		_mixerManager->init(); -//	} -  	/* Setup default save path to be workingdir/saves */  	char savePath[PATH_MAX+1]; @@ -179,7 +141,14 @@ void OSystem_OP::initBackend() {  	/* Make sure SDL knows that we have a joystick we want to use. */  	ConfMan.setInt("joystick_num", 0); -//	_graphicsMutex = createMutex(); +	// Create the events manager +	if (_eventSource == 0) +		_eventSource = new OPEventSource(); + +	// Create the graphics manager +	if (_graphicsManager == 0) { +		_graphicsManager = new OPGraphicsManager(_eventSource); +	}  	/* Pass to POSIX method to do the heavy lifting */  	OSystem_POSIX::initBackend(); @@ -187,24 +156,6 @@ void OSystem_OP::initBackend() {  	_inited = true;  } -// enable joystick -//	if (joystick_num > -1 && SDL_NumJoysticks() > 0) { -//		printf("Using joystick: %s\n", SDL_JoystickName(0)); -//		_joystick = SDL_JoystickOpen(joystick_num); -//	} -// -//	setupMixer(); - -// Note: We could implement a custom SDLTimerManager by using -// SDL_AddTimer. That might yield better timer resolution, but it would -// also change the semantics of a timer: Right now, ScummVM timers -// *never* run in parallel, due to the way they are implemented. If we -// switched to SDL_AddTimer, each timer might run in a separate thread. -// However, not all our code is prepared for that, so we can't just -// switch. Still, it's a potential future change to keep in mind. -//	_timer = new DefaultTimerManager(); -//	_timerID = SDL_AddTimer(10, &timer_handler, _timer); -  void OSystem_OP::initSDL() {  	// Check if SDL has not been initialized  	if (!_initedSDL) { @@ -217,38 +168,7 @@ void OSystem_OP::initSDL() {  		if (SDL_Init(sdlFlags) == -1)  			error("Could not initialize SDL: %s", SDL_GetError()); -		uint8_t hiddenCursorData = 0; - -		hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); - -		/* On the OpenPandora we need to work around an SDL assumption that -		   returns relative mouse coordinates when you get to the screen -		   edges using the touchscreen. The workaround is to set a blank -		   SDL cursor and not disable it (Hackish I know). - -		   The root issues likes in the Windows Manager GRAB code in SDL. -		   That is why the issue is not seen on framebuffer devices like the -		   GP2X (there is no X window manager ;)). -		*/ -		SDL_ShowCursor(SDL_ENABLE); -		SDL_SetCursor(hiddenCursor); -		SDL_EnableUNICODE(1); - -//		memset(&_oldVideoMode, 0, sizeof(_oldVideoMode)); -//		memset(&_videoMode, 0, sizeof(_videoMode)); -//		memset(&_transactionDetails, 0, sizeof(_transactionDetails)); - -//		_videoMode.mode = GFX_DOUBLESIZE; -//		_videoMode.scaleFactor = 2; -//		_videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio"); -//		_scalerProc = Normal2x; -//		_scalerType = 0; - -//		_videoMode.fullscreen = true; -  		_initedSDL = true; - -//	OSystem_POSIX::initSDL();  	}  } @@ -275,8 +195,6 @@ void OSystem_OP::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {  void OSystem_OP::quit() { -	SDL_FreeCursor(hiddenCursor); -  #ifdef DUMP_STDOUT  	printf("%s\n", "Debug: STDOUT and STDERR text files closed.");  	fclose(stdout); diff --git a/backends/platform/openpandora/op-options.cpp b/backends/platform/openpandora/op-options.cpp index 58f0fb7188..005a76b76c 100644 --- a/backends/platform/openpandora/op-options.cpp +++ b/backends/platform/openpandora/op-options.cpp @@ -33,7 +33,8 @@ enum {  	/* Touchscreen TapMode */  	TAPMODE_LEFT        = 0,  	TAPMODE_RIGHT       = 1, -	TAPMODE_HOVER       = 2 +	TAPMODE_HOVER       = 2, +	TAPMODE_HOVER_DPAD  = 3  };  int tapmodeLevel = TAPMODE_LEFT; @@ -44,6 +45,8 @@ void ToggleTapMode() {  	} else if (tapmodeLevel == TAPMODE_RIGHT) {  		tapmodeLevel = TAPMODE_HOVER;  	} else if (tapmodeLevel == TAPMODE_HOVER) { +		tapmodeLevel = TAPMODE_HOVER_DPAD; +	} else if (tapmodeLevel == TAPMODE_HOVER_DPAD) {  		tapmodeLevel = TAPMODE_LEFT;  	} else {  		tapmodeLevel = TAPMODE_LEFT; diff --git a/backends/platform/openpandora/op-sdl.h b/backends/platform/openpandora/op-sdl.h index 8cccbb5f86..1eddad5c4a 100644 --- a/backends/platform/openpandora/op-sdl.h +++ b/backends/platform/openpandora/op-sdl.h @@ -31,8 +31,6 @@  #include "backends/events/openpandora/op-events.h"  #include "backends/graphics/openpandora/op-graphics.h" -//#define MIXER_DOUBLE_BUFFERING 1 -  #ifndef PATH_MAX  #define PATH_MAX 255  #endif diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp index f93166ef67..e818305c29 100644 --- a/backends/platform/ps2/Gs2dScreen.cpp +++ b/backends/platform/ps2/Gs2dScreen.cpp @@ -102,8 +102,7 @@ int vblankEndHandler(int cause) {  void createAnimThread(Gs2dScreen *screen); -Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) { - +Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode mode) {  	_systemQuit = false;  	ee_sema_t newSema;  	newSema.init_count = 1; @@ -118,7 +117,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {  	_vblankStartId = AddIntcHandler(INT_VBLANK_START, vblankStartHandler, 0);  	_vblankEndId   = AddIntcHandler(INT_VBLANK_END, vblankEndHandler, 0); -	_dmacId		   = AddDmacHandler(2, dmacHandler, 0); +	_dmacId        = AddDmacHandler(2, dmacHandler, 0);  	_dmaPipe = new DmaPipe(0x2000); @@ -139,7 +138,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {  	_clut[1] = GS_RGBA(0xC0, 0xC0, 0xC0, 0);  	clearOverlay(); -	if (tvMode == TV_DONT_CARE) { +	if (mode == TV_DONT_CARE) {  #if 1  	char romver[8];  	int fd = fioOpen("rom0:ROMVER", O_RDONLY); @@ -157,12 +156,12 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {  			_tvMode = TV_NTSC;  #endif  	} else -		_tvMode = tvMode; +		_tvMode = mode;  	// _tvMode = TV_NTSC;  	printf("Setting up %s mode\n", (_tvMode == TV_PAL) ? "PAL" : "NTSC"); -    // set screen size, 640x512 for pal, 640x448 for ntsc +	// set screen size, 640x512 for pal, 640x448 for ntsc  	_tvWidth = 640;  	_tvHeight = ((_tvMode == TV_PAL) ? 512 /*544*/ : 448);  	kFullScreen[0].z = kFullScreen[1].z = 0; @@ -186,8 +185,8 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {  	_clutPtrs[MOUSE]  = _clutPtrs[SCREEN] + 0x1000; // the cluts in PSMCT32 take up half a memory page each  	_clutPtrs[TEXT]   = _clutPtrs[SCREEN] + 0x2000;  	_texPtrs[SCREEN]  = _clutPtrs[SCREEN] + 0x3000; -	_texPtrs[TEXT]    = 0;						  // these buffers are stored in the alpha gaps of the frame buffers -	_texPtrs[MOUSE]	  = 128 * 256 * 4; +	_texPtrs[TEXT]    = 0;                          // these buffers are stored in the alpha gaps of the frame buffers +	_texPtrs[MOUSE]   = 128 * 256 * 4;  	_texPtrs[PRINTF]  = _texPtrs[MOUSE] + M_SIZE * M_SIZE * 4;  	_showOverlay = false; @@ -201,14 +200,14 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {  	_overlayFormat.bytesPerPixel = 2;  	_overlayFormat.rLoss = 3; -    _overlayFormat.gLoss = 3; -    _overlayFormat.bLoss = 3; -    _overlayFormat.aLoss = 7; +	_overlayFormat.gLoss = 3; +	_overlayFormat.bLoss = 3; +	_overlayFormat.aLoss = 7; -    _overlayFormat.rShift = 0; -    _overlayFormat.gShift = 5; -    _overlayFormat.bShift = 10; -    _overlayFormat.aShift = 15; +	_overlayFormat.rShift = 0; +	_overlayFormat.gShift = 5; +	_overlayFormat.bShift = 10; +	_overlayFormat.aShift = 15;  	// setup hardware now.  	GS_CSR = CSR_RESET; // Reset GS @@ -249,18 +248,18 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {  	createAnimTextures(); -	// create anim thread -	ee_thread_t animThread, thisThread; +	// create animation thread +	ee_thread_t animationThread, thisThread;  	ReferThreadStatus(GetThreadId(), &thisThread);  	_animStack = malloc(ANIM_STACK_SIZE); -	animThread.initial_priority = thisThread.current_priority - 3; -	animThread.stack	  = _animStack; -	animThread.stack_size = ANIM_STACK_SIZE; -	animThread.func		  = (void *)runAnimThread; -	animThread.gp_reg	  = &_gp; +	animationThread.initial_priority = thisThread.current_priority - 3; +	animationThread.stack      = _animStack; +	animationThread.stack_size = ANIM_STACK_SIZE; +	animationThread.func       = (void *)runAnimThread; +	animationThread.gp_reg     = &_gp; -	_animTid = CreateThread(&animThread); +	_animTid = CreateThread(&animationThread);  	assert(_animTid >= 0);  	StartThread(_animTid, this);  } @@ -268,13 +267,13 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {  void Gs2dScreen::quit(void) {  	_systemQuit = true;  	ee_thread_t statAnim; -	do {	// wait until thread called ExitThread() +	do { // wait until thread called ExitThread()  		SignalSema(g_AnimSema);  		ReferThreadStatus(_animTid, &statAnim);  	} while (statAnim.status != 0x10);  	DeleteThread(_animTid);  	free(_animStack); -	_dmaPipe->waitForDma();	// wait for dmac and vblank for the last time +	_dmaPipe->waitForDma(); // wait for dmac and vblank for the last time  	while (g_DmacCmd || g_VblankCmd);  	sioprintf("kill handlers\n"); @@ -606,7 +605,7 @@ void Gs2dScreen::grabOverlay(byte *buf, uint16 pitch) {  	for (uint32 cnt = 0; cnt < _height; cnt++) {  		memcpy(buf, src, _width * 2);  		buf += pitch; -        src += _width; +		src += _width;  	}  } diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h index 005dabc809..1a70dad170 100644 --- a/backends/platform/ps2/Gs2dScreen.h +++ b/backends/platform/ps2/Gs2dScreen.h @@ -29,7 +29,6 @@  #include "backends/platform/ps2/DmaPipe.h"  #include "graphics/surface.h" -  enum TVMode {  	TV_DONT_CARE = 0,  	TV_PAL, @@ -41,10 +40,9 @@ enum GsInterlace {  	GS_INTERLACED  }; -  class Gs2dScreen {  public: -	Gs2dScreen(uint16 width, uint16 height, TVMode tvMode); +	Gs2dScreen(uint16 width, uint16 height, TVMode mode);  	~Gs2dScreen(void);  	void newScreenSize(uint16 width, uint16 height);  	uint8 tvMode(void); @@ -94,27 +92,26 @@ private:  	uint8  _curDrawBuf;  	uint32 _frameBufPtr[2]; // -	uint32 _clutPtrs[3];    //   vram pointers +	uint32 _clutPtrs[3];    // vram pointers  	uint32 _texPtrs[4];     //  	Graphics::Surface _framebuffer; -	/* TODO : check if we do need this */ -    struct VideoState { -        bool setup; +	// TODO : check if we do need this +	struct VideoState { +		bool setup; -        bool fullscreen; -        bool aspectRatio; +		bool fullscreen; +		bool aspectRatio; -        int mode; -        int scaleFactor; +		int mode; +		int scaleFactor; -        int screenWidth, screenHeight; -        int overlayWidth, overlayHeight; -    }; +		int screenWidth, screenHeight; +		int overlayWidth, overlayHeight; +	};  	VideoState _videoMode; -	/* */  	uint16 _width, _height, _pitch;  	int16  _mouseX, _mouseY, _hotSpotX, _hotSpotY; diff --git a/backends/platform/ps2/ps2pad.cpp b/backends/platform/ps2/ps2pad.cpp index b6afc217e6..607b614691 100644 --- a/backends/platform/ps2/ps2pad.cpp +++ b/backends/platform/ps2/ps2pad.cpp @@ -51,6 +51,9 @@ void Ps2Pad::initPad(void) {  	} else {  		if (checkPadReady(_port, _slot)) {  			switch (_padStatus) { +				case STAT_NONE: +					printf("Pad Status is None. Shouldn't happen\n"); +					break;  				case STAT_OPEN:  					_padStatus = STAT_DETECT;  					break; diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm index 97c7edba3e..0d2a2ab7f2 100644 --- a/backends/platform/sdl/macosx/appmenu_osx.mm +++ b/backends/platform/sdl/macosx/appmenu_osx.mm @@ -35,9 +35,8 @@  - (void)setAppleMenu:(NSMenu *)menu;  @end -NSString *constructNSStringFromCString(const char* rawCString, NSStringEncoding stringEncoding) { -        NSData *nsData = [NSData dataWithBytes:rawCString length:strlen(rawCString)]; -        return [[NSString alloc] initWithData:nsData encoding:stringEncoding]; +NSString *constructNSStringFromCString(const char *rawCString, CFStringEncoding stringEncoding) { +	return (NSString *)CFStringCreateWithCString(NULL, rawCString, stringEncoding);  }  void replaceApplicationMenuItems() { @@ -59,11 +58,11 @@ void replaceApplicationMenuItems() {  	// Get current encoding  #ifdef USE_TRANSLATION -	nsString = constructNSStringFromCString((TransMan.getCurrentCharset()).c_str(), NSASCIIStringEncoding); -	NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)nsString)); +	nsString = constructNSStringFromCString(TransMan.getCurrentCharset().c_str(), NSASCIIStringEncoding); +	CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)nsString);  	[nsString release];  #else -	NSStringEncoding stringEncoding = NSASCIIStringEncoding; +	CFStringEncoding stringEncoding = kCFStringEncodingASCII;  #endif  	// Add "About ScummVM" menu item diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index 639bd980f6..85342d62fd 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -39,7 +39,6 @@  #include "ApplicationServices/ApplicationServices.h"	// for LSOpenFSRef  #include "CoreFoundation/CoreFoundation.h"	// for CF* stuff -#include "CoreServices/CoreServices.h"	// for FSPathMakeRef  OSystem_MacOSX::OSystem_MacOSX()  	: @@ -107,13 +106,9 @@ bool OSystem_MacOSX::displayLogFile() {  	if (_logFilePath.empty())  		return false; -	FSRef ref; -	OSStatus err; - -	err = FSPathMakeRef((const UInt8 *)_logFilePath.c_str(), &ref, NULL); -	if (err == noErr) { -		err = LSOpenFSRef(&ref, NULL); -	} +    CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)_logFilePath.c_str(), _logFilePath.size(), false); +    OSStatus err = LSOpenCFURLRef(url, NULL); +    CFRelease(url);  	return err != noErr;  } @@ -156,7 +151,7 @@ Common::String OSystem_MacOSX::getSystemLanguage() const {  			}  			CFRelease(preferredLocalizations);  		} -		 +  	}  	// Falback to POSIX implementation  	return OSystem_POSIX::getSystemLanguage(); diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h index 4837e643b3..d9cb28b973 100644 --- a/backends/platform/sdl/macosx/macosx.h +++ b/backends/platform/sdl/macosx/macosx.h @@ -32,7 +32,7 @@ public:  	virtual bool hasFeature(Feature f);  	virtual bool displayLogFile(); -	 +  	virtual Common::String getSystemLanguage() const;  	virtual void initBackend(); diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp deleted file mode 100644 index 040028079d..0000000000 --- a/backends/platform/sdl/main.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "common/scummsys.h" - -// Several SDL based ports use a custom main, and hence do not want to compile -// of this file. The following "#if" ensures that. -#if !defined(POSIX) && \ -    !defined(WIN32) && \ -    !defined(MAEMO) && \ -    !defined(__SYMBIAN32__) && \ -    !defined(_WIN32_WCE) && \ -    !defined(__amigaos4__) && \ -    !defined(DINGUX) && \ -    !defined(CAANOO) && \ -    !defined(LINUXMOTO) && \ -    !defined(SAMSUNGTV) && \ -    !defined(PLAYSTATION3) && \ -    !defined(OPENPANDORA) - -#include "backends/platform/sdl/sdl.h" -#include "backends/plugins/sdl/sdl-provider.h" -#include "base/main.h" - -int main(int argc, char *argv[]) { - -	// Create our OSystem instance -	g_system = new OSystem_SDL(); -	assert(g_system); - -	// Pre initialize the backend -	((OSystem_SDL *)g_system)->init(); - -#ifdef DYNAMIC_MODULES -	PluginManager::instance().addPluginProvider(new SDLPluginProvider()); -#endif - -	// Invoke the actual ScummVM main entry point: -	int res = scummvm_main(argc, argv); - -	// Free OSystem -	delete (OSystem_SDL *)g_system; - -	return res; -} - -#endif diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk index 98a8265301..a17a326889 100644 --- a/backends/platform/sdl/module.mk +++ b/backends/platform/sdl/module.mk @@ -1,7 +1,6 @@  MODULE := backends/platform/sdl  MODULE_OBJS := \ -	main.o \  	sdl.o  ifdef POSIX diff --git a/backends/platform/symbian/README b/backends/platform/symbian/README index 31bc3d8fce..58cbc7814a 100644 --- a/backends/platform/symbian/README +++ b/backends/platform/symbian/README @@ -1,7 +1,7 @@   ScummVM - ScummVM ported to EPOC/SymbianOS - Copyright (C) 2008-2012 ScummVM Team + Copyright (C) 2008-2013 ScummVM Team   Copyright (C) 2003-2008 Lars 'AnotherGuest' Persson   Copyright (C) 2002-2008 Jurgen 'SumthinWicked' Braam diff --git a/backends/platform/symbian/S60/ScummVM_S60.mmp.in b/backends/platform/symbian/S60/ScummVM_S60.mmp.in index 81068ba073..28bd11dec6 100644 --- a/backends/platform/symbian/S60/ScummVM_S60.mmp.in +++ b/backends/platform/symbian/S60/ScummVM_S60.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/S60/ScummVM_S60_App.mmp b/backends/platform/symbian/S60/ScummVM_S60_App.mmp index e00987e2ad..38d6f19590 100644 --- a/backends/platform/symbian/S60/ScummVM_S60_App.mmp +++ b/backends/platform/symbian/S60/ScummVM_S60_App.mmp @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in index ccf38818dc..93636aca25 100644 --- a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in +++ b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in index 0162061284..c09934a46d 100644 --- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in +++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/S80/ScummVM_S80.mmp.in b/backends/platform/symbian/S80/ScummVM_S80.mmp.in index 7987ccd639..d9b9a5c948 100644 --- a/backends/platform/symbian/S80/ScummVM_S80.mmp.in +++ b/backends/platform/symbian/S80/ScummVM_S80.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/S80/ScummVM_S80_App.mmp b/backends/platform/symbian/S80/ScummVM_S80_App.mmp index b66bef7518..30b1c3f58b 100644 --- a/backends/platform/symbian/S80/ScummVM_S80_App.mmp +++ b/backends/platform/symbian/S80/ScummVM_S80_App.mmp @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/S90/Scummvm_S90.mmp.in b/backends/platform/symbian/S90/Scummvm_S90.mmp.in index d803ce5647..790dca14f0 100644 --- a/backends/platform/symbian/S90/Scummvm_S90.mmp.in +++ b/backends/platform/symbian/S90/Scummvm_S90.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/S90/Scummvm_S90_App.mmp b/backends/platform/symbian/S90/Scummvm_S90_App.mmp index 0d8d2b8710..cf17f103ef 100644 --- a/backends/platform/symbian/S90/Scummvm_S90_App.mmp +++ b/backends/platform/symbian/S90/Scummvm_S90_App.mmp @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/UIQ2/ScummVM.rss b/backends/platform/symbian/UIQ2/ScummVM.rss index a6ba4021e4..bfdd07e898 100644 --- a/backends/platform/symbian/UIQ2/ScummVM.rss +++ b/backends/platform/symbian/UIQ2/ScummVM.rss @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * This program is free software; you can redistribute it and/or   * modify it under the terms of the GNU General Public License diff --git a/backends/platform/symbian/UIQ3/ScummVM.rss b/backends/platform/symbian/UIQ3/ScummVM.rss index 00ed4e3b5c..b7f0a17113 100644 --- a/backends/platform/symbian/UIQ3/ScummVM.rss +++ b/backends/platform/symbian/UIQ3/ScummVM.rss @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss index 00ed4e3b5c..b7f0a17113 100644 --- a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss +++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in index 9e419ad6d9..255bc0f862 100644 --- a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in +++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2009 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2009 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in index 41452127ca..83d782d1a6 100644 --- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in +++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss index 9af9a33a75..47e7c44642 100644 --- a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss +++ b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_agi.mmp.in b/backends/platform/symbian/mmp/scummvm_agi.mmp.in index 7d197f786f..892ed57732 100644 --- a/backends/platform/symbian/mmp/scummvm_agi.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_agi.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_agos.mmp.in b/backends/platform/symbian/mmp/scummvm_agos.mmp.in index 587d1f0b69..d3bc84ed51 100644 --- a/backends/platform/symbian/mmp/scummvm_agos.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_agos.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in index 05cf526233..d6dfafd014 100644 --- a/backends/platform/symbian/mmp/scummvm_base.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_cine.mmp.in b/backends/platform/symbian/mmp/scummvm_cine.mmp.in index 79806eb8c2..cb7143b837 100644 --- a/backends/platform/symbian/mmp/scummvm_cine.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_cine.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in index 53d52c80e7..c26e93dedc 100644 --- a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_draci.mmp.in b/backends/platform/symbian/mmp/scummvm_draci.mmp.in index 9a7c87c963..52f862bc6f 100644 --- a/backends/platform/symbian/mmp/scummvm_draci.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_draci.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in index fcd7ce7585..9ea02fefe8 100644 --- a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_gob.mmp.in b/backends/platform/symbian/mmp/scummvm_gob.mmp.in index 23f110bc7d..906d54b487 100644 --- a/backends/platform/symbian/mmp/scummvm_gob.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_gob.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in index 6bdeb06b10..e7f70bc110 100644 --- a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in index 69888bb0ee..13dd7efa1e 100644 --- a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in index 4a2a87216e..5772bfaad0 100644 --- a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in index 27ec0b2148..b8db95ea0c 100644 --- a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_lure.mmp.in b/backends/platform/symbian/mmp/scummvm_lure.mmp.in index 20b938a83f..84c3eecd5e 100644 --- a/backends/platform/symbian/mmp/scummvm_lure.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_lure.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_m4.mmp.in b/backends/platform/symbian/mmp/scummvm_m4.mmp.in index fafd5e1e5f..e69b40ceb0 100644 --- a/backends/platform/symbian/mmp/scummvm_m4.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_m4.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_made.mmp.in b/backends/platform/symbian/mmp/scummvm_made.mmp.in index 4d5ab6cc33..b52d9cc6cb 100644 --- a/backends/platform/symbian/mmp/scummvm_made.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_made.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in index 3fc7c4ca5b..5f7bd4e144 100644 --- a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in index 05578b5994..f8ee389577 100644 --- a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_queen.mmp.in b/backends/platform/symbian/mmp/scummvm_queen.mmp.in index bfc0a2f760..f507f482f9 100644 --- a/backends/platform/symbian/mmp/scummvm_queen.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_queen.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_saga.mmp.in b/backends/platform/symbian/mmp/scummvm_saga.mmp.in index 831f02bdb6..cd158556dc 100644 --- a/backends/platform/symbian/mmp/scummvm_saga.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_saga.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_sci.mmp.in b/backends/platform/symbian/mmp/scummvm_sci.mmp.in index 705f8d0c43..5749c66e10 100644 --- a/backends/platform/symbian/mmp/scummvm_sci.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_sci.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in index 6b2ad35594..c07725e002 100644 --- a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_sky.mmp.in b/backends/platform/symbian/mmp/scummvm_sky.mmp.in index 5fdfb56320..b5048106dc 100644 --- a/backends/platform/symbian/mmp/scummvm_sky.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_sky.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in index 075968cf98..578839e8c4 100644 --- a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in index 32ab259ee4..23a055c99c 100644 --- a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in index 61c50bd307..58bfa4c337 100644 --- a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in index 375d948190..4cdd0bd774 100644 --- a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_toon.mmp.in b/backends/platform/symbian/mmp/scummvm_toon.mmp.in index d105156107..00f84d2bec 100644 --- a/backends/platform/symbian/mmp/scummvm_toon.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_toon.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_touche.mmp.in b/backends/platform/symbian/mmp/scummvm_touche.mmp.in index 36588e051f..e59dd0cd00 100644 --- a/backends/platform/symbian/mmp/scummvm_touche.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_touche.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in index fb9b075435..cd4aa158dc 100644 --- a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in index f8954e6d21..0ff8eb9920 100644 --- a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/res/ScummVmAif.rss b/backends/platform/symbian/res/ScummVmAif.rss index 3e7a86a3bc..fab2cadbb8 100644 --- a/backends/platform/symbian/res/ScummVmAif.rss +++ b/backends/platform/symbian/res/ScummVmAif.rss @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/res/scummvm.rss b/backends/platform/symbian/res/scummvm.rss index 361f831e3c..7e667f1cf3 100644 --- a/backends/platform/symbian/res/scummvm.rss +++ b/backends/platform/symbian/res/scummvm.rss @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/res/scummvm_A0000658.rss b/backends/platform/symbian/res/scummvm_A0000658.rss index 14d591c990..3325d72249 100644 --- a/backends/platform/symbian/res/scummvm_A0000658.rss +++ b/backends/platform/symbian/res/scummvm_A0000658.rss @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/symbian/src/ScummVm.hrh b/backends/platform/symbian/src/ScummVm.hrh index a84664f995..c43a9da118 100644 --- a/backends/platform/symbian/src/ScummVm.hrh +++ b/backends/platform/symbian/src/ScummVm.hrh @@ -2,7 +2,7 @@   * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL   * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System   * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer - * Copyright (C) 2005-2012 The ScummVM project + * Copyright (C) 2005-2013 The ScummVM project   *   * ScummVM is the legal property of its developers, whose names   * are too numerous to list here. Please refer to the COPYRIGHT diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp index 4ec153a7e9..fc18628235 100644 --- a/backends/platform/webos/webos.cpp +++ b/backends/platform/webos/webos.cpp @@ -45,24 +45,4 @@ void OSystem_SDL_WebOS::initBackend() {  	OSystem_SDL::initBackend();  } -/** - * Gets the original SDL hardware key set, adds WebOS specific keys and - * returns the new key set. - * - * @return The hardware key set with added webOS specific keys. - */ -#ifdef ENABLE_KEYMAPPER -HardwareInputSet *OSystem_SDL_WebOS::getHardwareInputSet() { -	// Get the original SDL hardware key set -	HardwareInputSet *inputSet = OSystem_SDL::getHardwareInputSet(); - -	// Add WebOS specific keys -	inputSet->addHardwareInput(new HardwareInput("FORWARD", -		KeyState((KeyCode) 229, 229, 0), "Forward")); - -	// Return the modified hardware key set -	return inputSet; -} -#endif -  #endif diff --git a/backends/platform/webos/webos.h b/backends/platform/webos/webos.h index 8dfa43239c..dda56a70da 100644 --- a/backends/platform/webos/webos.h +++ b/backends/platform/webos/webos.h @@ -31,9 +31,6 @@ public:  	OSystem_SDL_WebOS();  	virtual void initBackend(); -#ifdef ENABLE_KEYMAPPER -	virtual Common::HardwareInputSet *getHardwareInputSet(); -#endif  };  #endif diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 681675529a..22a6495f8f 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -39,7 +39,7 @@  OSystem_Wii::OSystem_Wii() :  	_startup_time(0), -	_cursorScale(1), +	_cursorDontScale(true),  	_cursorPaletteDisabled(true),  	_cursorPalette(NULL),  	_cursorPaletteDirty(false), diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index abafa7f642..5d6998d0b6 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -56,7 +56,7 @@ class OSystem_Wii : public EventsBaseBackend, public PaletteManager {  private:  	s64 _startup_time; -	int _cursorScale; +	bool _cursorDontScale;  	bool _cursorPaletteDisabled;  	u16 *_cursorPalette;  	bool _cursorPaletteDirty; diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 90e4d98c6b..a9bcdbb8d1 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -451,7 +451,7 @@ bool OSystem_Wii::needsScreenUpdate() {  void OSystem_Wii::updateScreen() {  	static f32 ar;  	static gfx_screen_coords_t cc; -	static int cs; +	static f32 csx, csy;  	u32 now = getMillis();  	if (now - _lastScreenUpdate < 1000 / MAX_FPS) @@ -466,7 +466,6 @@ void OSystem_Wii::updateScreen() {  	wii_memstats();  #endif -	cs = _cursorScale;  	_lastScreenUpdate = now;  	if (_overlayVisible || _consoleVisible) @@ -488,12 +487,6 @@ void OSystem_Wii::updateScreen() {  		if (_gameRunning)  			ar = gfx_set_ar(4.0 / 3.0); -		// ugly, but the modern theme sets a factor of 3, only god knows why -		if (cs > 2) -			cs = 1; -		else -			cs *= 2; -  		if (_overlayDirty) {  			gfx_tex_convert(&_texOverlay, _overlayPixels);  			_overlayDirty = false; @@ -503,10 +496,18 @@ void OSystem_Wii::updateScreen() {  	}  	if (_mouseVisible) { -		cc.x = f32(_mouseX - cs * _mouseHotspotX) * _currentXScale; -		cc.y = f32(_mouseY - cs * _mouseHotspotY) * _currentYScale; -		cc.w = f32(_texMouse.width) * _currentXScale * cs; -		cc.h = f32(_texMouse.height) * _currentYScale * cs; +		if (_cursorDontScale) { +			csx = 1.0f / _currentXScale; +			csy = 1.0f / _currentYScale; +		} else { +			csx = 1.0f; +			csy = 1.0f; +		} + +		cc.x = f32(_mouseX - csx * _mouseHotspotX) * _currentXScale; +		cc.y = f32(_mouseY - csy * _mouseHotspotY) * _currentYScale; +		cc.w = f32(_texMouse.width) * _currentXScale * csx; +		cc.h = f32(_texMouse.height) * _currentYScale * csy;  		if (_texMouse.palette && _cursorPaletteDirty) {  			_texMouse.palette[_mouseKeyColor] = 0; @@ -608,7 +609,7 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,  		return;  	uint16 *dst = _overlayPixels + (y * _overlayWidth + x); -	if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) { +	if (_overlayWidth == (uint16)w && (uint16)pitch == _overlayWidth * sizeof(uint16)) {  		memcpy(dst, src, h * pitch);  	} else {  		do { @@ -745,8 +746,7 @@ void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX,  	_mouseHotspotX = hotspotX;  	_mouseHotspotY = hotspotY; -	// TODO: Adapt to new dontScale logic! -	_cursorScale = 1; +	_cursorDontScale = dontScale;  	if ((_texMouse.palette) && (oldKeycolor != _mouseKeyColor))  		_cursorPaletteDirty = true; diff --git a/backends/platform/wince/CEgui/GUIElement.cpp b/backends/platform/wince/CEgui/GUIElement.cpp index 241cf514f3..c8e68b87fd 100644 --- a/backends/platform/wince/CEgui/GUIElement.cpp +++ b/backends/platform/wince/CEgui/GUIElement.cpp @@ -98,19 +98,19 @@ bool GUIElement::drawn() {  	return _drawn;  } -int GUIElement::x() { +int GUIElement::getX() {  	return _x;  } -int GUIElement::y() { +int GUIElement::getY() {  	return _y;  } -int GUIElement::width() { +int GUIElement::getWidth() {  	return _width;  } -int GUIElement::height() { +int GUIElement::getHeight() {  	return _height;  } diff --git a/backends/platform/wince/CEgui/GUIElement.h b/backends/platform/wince/CEgui/GUIElement.h index 2639de38ca..44c4b3f275 100644 --- a/backends/platform/wince/CEgui/GUIElement.h +++ b/backends/platform/wince/CEgui/GUIElement.h @@ -40,10 +40,10 @@ public:  	virtual bool draw(SDL_Surface *surface);  	virtual ~GUIElement();  	void move(int x, int y); -	int width(); -	int height(); -	int x(); -	int y(); +	int getWidth(); +	int getHeight(); +	int getX(); +	int getY();  	virtual bool action(int x, int y, bool pushed) = 0;  	bool visible();  	bool drawn(); diff --git a/backends/platform/wince/CEgui/ToolbarHandler.cpp b/backends/platform/wince/CEgui/ToolbarHandler.cpp index 6f4ac317cd..f3e42e11fa 100644 --- a/backends/platform/wince/CEgui/ToolbarHandler.cpp +++ b/backends/platform/wince/CEgui/ToolbarHandler.cpp @@ -96,10 +96,10 @@ bool ToolbarHandler::draw(SDL_Surface *surface, SDL_Rect *rect) {  	if (_active) {  		bool result = _active->draw(surface);  		if (result) { -			rect->x = _active->x(); -			rect->y = _active->y(); -			rect->w = _active->width(); -			rect->h = _active->height(); +			rect->x = _active->getX(); +			rect->y = _active->getY(); +			rect->w = _active->getWidth(); +			rect->h = _active->getHeight();  		}  		return result;  	} else diff --git a/backends/saves/windows/windows-saves.cpp b/backends/saves/windows/windows-saves.cpp index 87348c3416..d520632394 100644 --- a/backends/saves/windows/windows-saves.cpp +++ b/backends/saves/windows/windows-saves.cpp @@ -26,8 +26,12 @@  #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) +#if defined(ARRAYSIZE) +#undef ARRAYSIZE +#endif  #define WIN32_LEAN_AND_MEAN  #include <windows.h> +#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one...  #include "common/config-manager.h"  #include "common/savefile.h" diff --git a/backends/taskbar/win32/mingw-compat.h b/backends/taskbar/win32/mingw-compat.h index 55105407c6..f6151936f1 100644 --- a/backends/taskbar/win32/mingw-compat.h +++ b/backends/taskbar/win32/mingw-compat.h @@ -70,7 +70,7 @@ DECLARE_INTERFACE_(IPropertyStore, IUnknown) {  	STDMETHOD (GetValue) (REFPROPERTYKEY key, PROPVARIANT *pv) PURE;  	STDMETHOD (SetValue) (REFPROPERTYKEY key, REFPROPVARIANT propvar) PURE;  	STDMETHOD (Commit) (void) PURE; -	 +  private:  	~IPropertyStore();  }; @@ -137,7 +137,7 @@ DECLARE_INTERFACE_(ITaskbarList3, IUnknown) {  	STDMETHOD (SetOverlayIcon) (THIS_ HWND hwnd, HICON hIcon, LPCWSTR pszDescription) PURE;  	STDMETHOD (SetThumbnailTooltip) (THIS_ HWND hwnd, LPCWSTR pszTip) PURE;  	STDMETHOD (SetThumbnailClip) (THIS_ HWND hwnd, RECT *prcClip) PURE; -	 +  private:  	~ITaskbarList3();  }; diff --git a/backends/timer/bada/timer.cpp b/backends/timer/bada/timer.cpp index f030e0695f..e41ecd4864 100644 --- a/backends/timer/bada/timer.cpp +++ b/backends/timer/bada/timer.cpp @@ -1,115 +1,115 @@ -/* ScummVM - Graphic Adventure Engine
 - *
 - * ScummVM is the legal property of its developers, whose names
 - * are too numerous to list here. Please refer to the COPYRIGHT
 - * file distributed with this source distribution.
 - *
 - * This program is free software; you can redistribute it and/or
 - * modify it under the terms of the GNU General Public License
 - * as published by the Free Software Foundation; either version 2
 - * of the License, or (at your option) any later version.
 - *
 - * This program is distributed in the hope that it will be useful,
 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
 - * GNU General Public License for more details.
 - *
 - * You should have received a copy of the GNU General Public License
 - * along with this program; if not, write to the Free Software
 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 - *
 - */
 -
 -#if defined(BADA)
 -
 -#include "backends/timer/bada/timer.h"
 -
 -//
 -// TimerSlot
 -//
 -TimerSlot::TimerSlot(Common::TimerManager::TimerProc callback,
 -										 uint32 interval, void *refCon) :
 -	_timer(0),
 -	_callback(callback),
 -	_interval(interval),
 -	_refCon(refCon) {
 -}
 -
 -TimerSlot::~TimerSlot() {
 -}
 -
 -bool TimerSlot::OnStart() {
 -	_timer = new Osp::Base::Runtime::Timer();
 -	if (!_timer || IsFailed(_timer->Construct(*this))) {
 -		AppLog("Failed to create timer");
 -		return false;
 -	}
 -
 -	if (IsFailed(_timer->Start(_interval))) {
 -		AppLog("failed to start timer");
 -		return false;
 -	}
 -	
 -	AppLog("started timer %d", _interval);
 -	return true;
 -}
 -
 -void TimerSlot::OnStop() {
 -	AppLog("timer stopped");
 -	if (_timer) {
 -		_timer->Cancel();		 
 -		delete _timer;
 -		_timer = NULL;
 -	}
 -}
 -
 -void TimerSlot::OnTimerExpired(Timer &timer) {
 -	_callback(_refCon);
 -	timer.Start(_interval);
 -}
 -
 -//
 -// BadaTimerManager
 -//
 -BadaTimerManager::BadaTimerManager() {
 -}
 -
 -BadaTimerManager::~BadaTimerManager() {
 -	for (Common::List<TimerSlot>::iterator slot = _timers.begin();
 -			 slot != _timers.end(); ) {
 -		slot->Stop();
 -		slot = _timers.erase(slot);
 -	}
 -}
 -
 -bool BadaTimerManager::installTimerProc(TimerProc proc, int32 interval, void *refCon,
 -																				const Common::String &id) {
 -	TimerSlot *slot = new TimerSlot(proc, interval / 1000, refCon);
 -
 -	if (IsFailed(slot->Construct(THREAD_TYPE_EVENT_DRIVEN))) {
 -		AppLog("Failed to create timer thread");
 -		delete slot;
 -		return false;
 -	}
 -
 -	if (IsFailed(slot->Start())) {
 -		delete slot;
 -		AppLog("Failed to start timer thread");
 -		return false;
 -	}
 -
 -	_timers.push_back(*slot);
 -	return true;
 -}
 -
 -void BadaTimerManager::removeTimerProc(TimerProc proc) {
 -	for (Common::List<TimerSlot>::iterator slot = _timers.begin();
 -			 slot != _timers.end(); ++slot) {
 -		if (slot->_callback == proc) {
 -			slot->Stop();
 -			slot = _timers.erase(slot);
 -		}
 -	}
 -}
 -
 -#endif
 +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#if defined(BADA) + +#include "backends/timer/bada/timer.h" + +// +// TimerSlot +// +TimerSlot::TimerSlot(Common::TimerManager::TimerProc callback, +										 uint32 interval, void *refCon) : +	_timer(0), +	_callback(callback), +	_interval(interval), +	_refCon(refCon) { +} + +TimerSlot::~TimerSlot() { +} + +bool TimerSlot::OnStart() { +	_timer = new Osp::Base::Runtime::Timer(); +	if (!_timer || IsFailed(_timer->Construct(*this))) { +		AppLog("Failed to create timer"); +		return false; +	} + +	if (IsFailed(_timer->Start(_interval))) { +		AppLog("failed to start timer"); +		return false; +	} + +	AppLog("started timer %d", _interval); +	return true; +} + +void TimerSlot::OnStop() { +	AppLog("timer stopped"); +	if (_timer) { +		_timer->Cancel(); +		delete _timer; +		_timer = NULL; +	} +} + +void TimerSlot::OnTimerExpired(Timer &timer) { +	_callback(_refCon); +	timer.Start(_interval); +} + +// +// BadaTimerManager +// +BadaTimerManager::BadaTimerManager() { +} + +BadaTimerManager::~BadaTimerManager() { +	for (Common::List<TimerSlot>::iterator slot = _timers.begin(); +			 slot != _timers.end(); ) { +		slot->Stop(); +		slot = _timers.erase(slot); +	} +} + +bool BadaTimerManager::installTimerProc(TimerProc proc, int32 interval, void *refCon, +																				const Common::String &id) { +	TimerSlot *slot = new TimerSlot(proc, interval / 1000, refCon); + +	if (IsFailed(slot->Construct(THREAD_TYPE_EVENT_DRIVEN))) { +		AppLog("Failed to create timer thread"); +		delete slot; +		return false; +	} + +	if (IsFailed(slot->Start())) { +		delete slot; +		AppLog("Failed to start timer thread"); +		return false; +	} + +	_timers.push_back(*slot); +	return true; +} + +void BadaTimerManager::removeTimerProc(TimerProc proc) { +	for (Common::List<TimerSlot>::iterator slot = _timers.begin(); +			 slot != _timers.end(); ++slot) { +		if (slot->_callback == proc) { +			slot->Stop(); +			slot = _timers.erase(slot); +		} +	} +} + +#endif diff --git a/backends/timer/bada/timer.h b/backends/timer/bada/timer.h index 04ca771c26..826064d7ff 100644 --- a/backends/timer/bada/timer.h +++ b/backends/timer/bada/timer.h @@ -1,62 +1,62 @@ -/* ScummVM - Graphic Adventure Engine
 - *
 - * ScummVM is the legal property of its developers, whose names
 - * are too numerous to list here. Please refer to the COPYRIGHT
 - * file distributed with this source distribution.
 - *
 - * This program is free software; you can redistribute it and/or
 - * modify it under the terms of the GNU General Public License
 - * as published by the Free Software Foundation; either version 2
 - * of the License, or (at your option) any later version.
 - *
 - * This program is distributed in the hope that it will be useful,
 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
 - * GNU General Public License for more details.
 - *
 - * You should have received a copy of the GNU General Public License
 - * along with this program; if not, write to the Free Software
 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 - *
 - */
 -
 -#ifndef BADA_TIMER_H
 -#define BADA_TIMER_H
 -
 -#include <FBase.h>
 -
 -#include "common/timer.h"
 -#include "common/list.h"
 -
 -using namespace Osp::Base::Runtime;
 -
 -struct TimerSlot: public ITimerEventListener, public Thread {
 -	TimerSlot(Common::TimerManager::TimerProc callback,
 -						uint32 interval,
 -						void *refCon);
 -	~TimerSlot();
 -
 -	bool OnStart(void);
 -	void OnStop(void);
 -	void OnTimerExpired(Timer &timer);
 -
 -	Timer *_timer;
 -	Common::TimerManager::TimerProc _callback;
 -	uint32 _interval;	// in microseconds
 -	void *_refCon;
 -};
 -
 -class BadaTimerManager : public Common::TimerManager {
 -public:
 -	BadaTimerManager();
 -	~BadaTimerManager();
 -
 -	bool installTimerProc(TimerProc proc, int32 interval, void *refCon, 
 -												const Common::String &id);
 -	void removeTimerProc(TimerProc proc);
 -
 -private:
 -	Common::List<TimerSlot> _timers;
 -};
 -
 -#endif
 +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef BADA_TIMER_H +#define BADA_TIMER_H + +#include <FBase.h> + +#include "common/timer.h" +#include "common/list.h" + +using namespace Osp::Base::Runtime; + +struct TimerSlot: public ITimerEventListener, public Thread { +	TimerSlot(Common::TimerManager::TimerProc callback, +						uint32 interval, +						void *refCon); +	~TimerSlot(); + +	bool OnStart(void); +	void OnStop(void); +	void OnTimerExpired(Timer &timer); + +	Timer *_timer; +	Common::TimerManager::TimerProc _callback; +	uint32 _interval;	// in microseconds +	void *_refCon; +}; + +class BadaTimerManager : public Common::TimerManager { +public: +	BadaTimerManager(); +	~BadaTimerManager(); + +	bool installTimerProc(TimerProc proc, int32 interval, void *refCon, +												const Common::String &id); +	void removeTimerProc(TimerProc proc); + +private: +	Common::List<TimerSlot> _timers; +}; + +#endif diff --git a/backends/timer/default/default-timer.cpp b/backends/timer/default/default-timer.cpp index 9cd803f148..9f56d58b12 100644 --- a/backends/timer/default/default-timer.cpp +++ b/backends/timer/default/default-timer.cpp @@ -156,7 +156,7 @@ void DefaultTimerManager::removeTimerProc(TimerProc callback) {  	}  	// We need to remove all names referencing the timer proc here. -	//  +	//  	// Else we run into troubles, when the client code removes and readds timer  	// callbacks.  	// diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm index 741e89891c..f3b221cabf 100644 --- a/backends/updates/macosx/macosx-updates.mm +++ b/backends/updates/macosx/macosx-updates.mm @@ -59,10 +59,14 @@ MacOSXUpdateManager::MacOSXUpdateManager() {  	[sparkleUpdater setFeedURL:[NSURL URLWithString:feedbackURL]];  	// Get current encoding -	NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding])); +	CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII); +	CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr); +	CFRelease(encStr);  	// Add "Check for Updates..." menu item -	NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:[NSString stringWithCString:_("Check for Updates...") encoding:stringEncoding] action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1]; +	CFStringRef title = CFStringCreateWithCString(NULL, _("Check for Updates..."), stringEncoding); +	NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:(NSString *)title action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1]; +	CFRelease(title);  	// Set the target of the new menu item  	[updateMenuItem setTarget:sparkleUpdater];  | 
