diff --git a/src/core/libraries/move/move.cpp b/src/core/libraries/move/move.cpp index cf4d38b73..9662fbfcc 100644 --- a/src/core/libraries/move/move.cpp +++ b/src/core/libraries/move/move.cpp @@ -86,8 +86,12 @@ s32 PS4_SYSV_ABI sceMoveReadStateLatest(s32 handle, OrbisMoveData* data) { m->ReadState(&s, &connected, &connected_count); data->button_data.trigger_data = u16(s.axes[std::to_underlying(Input::Axis::TriggerRight)]); data->button_data.button_data = std::to_underlying(PadToMoveOffset(s.buttonsState)); - data->accelerometer[1] = m->accel_buf[1]; - data->accelerometer[2] = m->accel_buf[2]; + data->accelerometer[0] = s.acceleration.x; + data->accelerometer[1] = s.acceleration.y; + data->accelerometer[2] = s.acceleration.z; + data->gyro[0] = s.angularVelocity.x; + data->gyro[1] = s.angularVelocity.y; + data->gyro[2] = s.angularVelocity.z; return ORBIS_OK; } diff --git a/src/sdl_window.cpp b/src/sdl_window.cpp index 7613e6a5f..cc6527dfe 100644 --- a/src/sdl_window.cpp +++ b/src/sdl_window.cpp @@ -75,7 +75,7 @@ static Uint32 SDLCALL PollController(void* userdata, SDL_TimerID timer_id, Uint3 controller->UpdateAxisSmoothing(); controller->Gyro(0); controller->Acceleration(0); - return 4; + return interval; } WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameControllers* controllers_, @@ -285,6 +285,7 @@ void WindowSDL::WaitEvent() { void WindowSDL::InitTimers() { for (int i = 0; i < 4; ++i) { SDL_AddTimer(4, &PollController, controllers[i]); + SDL_AddTimer(13, &PollController, controllers.moves(i)); } SDL_AddTimer(33, Input::MousePolling, (void*)controllers[0]); }