瀏覽代碼

Fixed clearing the mapping in testcontroller

Sam Lantinga 2 年之前
父節點
當前提交
e413457a7e
共有 1 個文件被更改,包括 0 次插入3 次删除
  1. 0 3
      src/joystick/SDL_gamepad.c

+ 0 - 3
src/joystick/SDL_gamepad.c

@@ -1418,9 +1418,6 @@ static char *SDL_PrivateGetGamepadMappingFromMappingString(const char *pMapping)
     while (SDL_isspace(pSecondComma[1])) {
     while (SDL_isspace(pSecondComma[1])) {
         ++pSecondComma;
         ++pSecondComma;
     }
     }
-    if (pSecondComma[1] == '\0') {
-        return NULL;
-    }
 
 
     result = SDL_strdup(pSecondComma + 1); /* mapping is everything after the 3rd comma */
     result = SDL_strdup(pSecondComma + 1); /* mapping is everything after the 3rd comma */