From 8345e29798f8e22ce0e0053ff62d08d61dce36fa Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 25 Sep 2016 21:16:23 -0700 Subject: [PATCH] SDL: Attach rumble in SDL frontend --- CHANGES | 1 + src/platform/sdl/main.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index a05acddd2..232a26abc 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,7 @@ Bugfixes: - Util: Fix PNG identification on files too small to be a PNG - GB: Fix invalid STOP behavior on Game Boy Color - GB, GBA: Fix emulator hardlocking when halting with IRQs off + - SDL: Attach rumble in SDL frontend Misc: - All: Only update version info if needed - FFmpeg: Encoding cleanup diff --git a/src/platform/sdl/main.c b/src/platform/sdl/main.c index 2df8fe761..616248924 100644 --- a/src/platform/sdl/main.c +++ b/src/platform/sdl/main.c @@ -138,6 +138,10 @@ int main(int argc, char** argv) { mSDLAttachPlayer(&renderer.events, &renderer.player); mSDLPlayerLoadConfig(&renderer.player, mCoreConfigGetInput(&renderer.core->config)); +#if SDL_VERSION_ATLEAST(2, 0, 0) + renderer.core->setRumble(renderer.core, &renderer.player.rumble.d); +#endif + int ret; // TODO: Use opts and config