Explicitly set numeric locale to "C". Fixes tsoding/nothing#1019
SDL_Init sets current locale to system locale, which
alters default floating-point format and results in
level definition parsing failure due to invalid floating
point value format.
#include <SDL.h>
+#include <locale.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -59,6 +60,8 @@ int main(int argc, char *argv[])
}
PUSH_LT(lt, 42, SDL_Quit);
+ setlocale(LC_NUMERIC, "C");
+
SDL_ShowCursor(SDL_DISABLE);
SDL_Window *const window = PUSH_LT(
