From 0716285fc219fbcf60d98165064c23b0cc6d7b6c Mon Sep 17 00:00:00 2001
From: Bart Trzynadlowski <bart.trzy@gmail.com>
Date: Fri, 9 Sep 2011 21:59:23 +0000
Subject: [PATCH] Fixed error reporting for -input-system option.

---
 Src/OSD/SDL/Main.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp
index 3e9c69f..4a4ed58 100644
--- a/Src/OSD/SDL/Main.cpp
+++ b/Src/OSD/SDL/Main.cpp
@@ -1309,9 +1309,13 @@ int main(int argc, char **argv)
 				CmdLine.Set("Global", "FragmentShader", &argv[i][13]);
 		}
 #ifdef SUPERMODEL_WIN32
-		else if (!strncmp(argv[i],"-input-system=", 14))	// this setting is not written to the config file!
+		else if (!strncmp(argv[i],"-input-system", 13))	// this setting is not written to the config file!
 		{
-			if (argv[i][14] == '\0')
+			if (argv[i][13] == '\0')
+				ErrorLog("-input-system requires an input system name.");
+			else if (argv[i][13] != '=')
+				ErrorLog("Ignoring unrecognized option: %s.", argv[i]);
+			else if (argv[i][14] == '\0')
 				ErrorLog("-input-system requires an input system name.");
 			else
 				inputSystem = &argv[i][14];