Commit 58ca76bee3ea3c8f74564ef5923f69ecef529116

Jimb Esser 2019-03-16T18:11:09

Fix DirectInput error codes being lost

diff --git a/src/SDL_error.c b/src/SDL_error.c
index 51d2211..f3f481b 100644
--- a/src/SDL_error.c
+++ b/src/SDL_error.c
@@ -81,7 +81,7 @@ SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
                 case 0:        /* Malformed format string.. */
                     --fmt;
                     break;
-                case 'i': case 'd': case 'u':
+                case 'i': case 'd': case 'u': case 'x': case 'X':
                     error->args[error->argc++].value_l = va_arg(ap, long);
                     break;
                 }
@@ -234,7 +234,7 @@ SDL_GetErrorMsg(char *errstr, int maxlen)
                     *spot++ = *fmt++;
                     *spot++ = '\0';
                     switch (spot[-2]) {
-                    case 'i': case 'd': case 'u':
+                    case 'i': case 'd': case 'u': case 'x': case 'X':
                       len = SDL_snprintf(msg, maxlen, tmp,
                                          error->args[argi++].value_l);
                       if (len > 0) {