浏览代码

Fixed GameController.LoadMappingsFromFile using hardcoded path always.

Mark Sibly 7 年之前
父节点
当前提交
e3b2e55136
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      modules/mojo/input/gamecontroller.monkey2

+ 5 - 1
modules/mojo/input/gamecontroller.monkey2

@@ -124,7 +124,11 @@ Class GameController
 		
 		Local n:=0
 		
-		For Local mapping:=Eachin LoadString( "asset::gamecontrollerdb.txt",True ).Split( "~n" )
+		For Local mapping:=Eachin LoadString( path,True ).Split( "~n" )
+			
+			mapping=mapping.Trim()
+			
+			If Not mapping Or mapping.StartsWith( "#" ) Continue
 			
 			n+=AddMapping( mapping )>0 ? 1 Else 0
 		Next