[Scummvm-cvs-logs] SF.net SVN: scummvm:[45817] scummvm/trunk/backends/platform/sdl

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Nov 10 23:12:11 CET 2009


Revision: 45817
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45817&view=rev
Author:   fingolfin
Date:     2009-11-10 22:12:10 +0000 (Tue, 10 Nov 2009)

Log Message:
-----------
SDL: cleanup

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/events.cpp
    scummvm/trunk/backends/platform/sdl/graphics.cpp
    scummvm/trunk/backends/platform/sdl/sdl.h

Modified: scummvm/trunk/backends/platform/sdl/events.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/events.cpp	2009-11-10 21:14:48 UTC (rev 45816)
+++ scummvm/trunk/backends/platform/sdl/events.cpp	2009-11-10 22:12:10 UTC (rev 45817)
@@ -301,9 +301,8 @@
 		handleScalerHotkeys(ev.key);
 		return false;
 	}
-	const bool event_complete = remapKey(ev, event);
 
-	if (event_complete)
+	if (remapKey(ev, event))
 		return true;
 
 	event.type = Common::EVENT_KEYDOWN;
@@ -314,18 +313,15 @@
 }
 
 bool OSystem_SDL::handleKeyUp(SDL_Event &ev, Common::Event &event) {
-	byte b = 0;
-	const bool event_complete = remapKey(ev, event);
-
-	if (event_complete)
+	if (remapKey(ev, event))
 		return true;
 
 	event.type = Common::EVENT_KEYUP;
 	event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
 	event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
-	b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
 
 	// Ctrl-Alt-<key> will change the GFX mode
+	byte b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
 	if ((b & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) {
 		// Swallow these key up events
 		return false;

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2009-11-10 21:14:48 UTC (rev 45816)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2009-11-10 22:12:10 UTC (rev 45817)
@@ -36,6 +36,7 @@
 
 static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
 	{"1x", "Normal (no scaling)", GFX_NORMAL},
+#ifndef DISABLE_SCALERS
 	{"2x", "2x", GFX_DOUBLESIZE},
 	{"3x", "3x", GFX_TRIPLESIZE},
 	{"2xsai", "2xSAI", GFX_2XSAI},
@@ -49,6 +50,7 @@
 #endif
 	{"tv2x", "TV2x", GFX_TV2X},
 	{"dotmatrix", "DotMatrix", GFX_DOTMATRIX},
+#endif
 	{0, 0, 0}
 };
 
@@ -452,8 +454,7 @@
 
 	assert(newFormat.bytesPerPixel > 0);
 
-	if (newFormat != _videoMode.format)
-	{
+	if (newFormat != _videoMode.format) {
 		_videoMode.format = newFormat;
 		_transactionDetails.formatChanged = true;
 		_screenFormat = newFormat;

Modified: scummvm/trunk/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl.h	2009-11-10 21:14:48 UTC (rev 45816)
+++ scummvm/trunk/backends/platform/sdl/sdl.h	2009-11-10 22:12:10 UTC (rev 45817)
@@ -57,6 +57,7 @@
 
 enum {
 	GFX_NORMAL = 0,
+#ifndef DISABLE_SCALERS
 	GFX_DOUBLESIZE = 1,
 	GFX_TRIPLESIZE = 2,
 	GFX_2XSAI = 3,
@@ -68,6 +69,7 @@
 	GFX_HQ3X = 9,
 	GFX_TV2X = 10,
 	GFX_DOTMATRIX = 11
+#endif
 };
 
 class AspectRatio {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list