Better Emscripten SDL fix (nw)

This commit is contained in:
Justin Kerk 2018-12-31 00:50:11 +00:00
parent f8efff0afe
commit 65d0a8477e

View File

@ -748,16 +748,17 @@ public:
{ {
SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
#ifdef SDLMAME_EMSCRIPTEN
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK)) if (SDL_InitSubSystem(SDL_INIT_JOYSTICK))
#else
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK|SDL_INIT_HAPTIC))
#endif
{ {
osd_printf_error("Could not initialize SDL Joystick: %s.\n", SDL_GetError()); osd_printf_error("Could not initialize SDL Joystick: %s.\n", SDL_GetError());
return; return;
} }
if (SDL_InitSubSystem(SDL_INIT_HAPTIC))
{
osd_printf_verbose("Could not initialize SDL Haptic subsystem: %s.\n", SDL_GetError());
}
sdl_input_module::input_init(machine); sdl_input_module::input_init(machine);
char tempname[512]; char tempname[512];