mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
Fix joystick initialization with Emscripten SDL [Justin Kerk]
This commit is contained in:
parent
56d8eeff86
commit
98d3d350cc
@ -748,7 +748,11 @@ 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))
|
||||||
|
#else
|
||||||
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK|SDL_INIT_HAPTIC))
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user