Convert Movie to a class with a static instance, and other fixes based on B3n30 feedback.

This commit is contained in:
danzel 2017-12-17 17:55:56 +13:00
parent 04541150b1
commit 0238e0c5e7
7 changed files with 129 additions and 81 deletions

View file

@ -194,7 +194,7 @@ void ExtraHID::SendHIDStatus() {
response.buttons.r_not_held.Assign(1);
response.unknown = 0;
Movie::HandleExtraHidResponse(response);
Core::Movie::GetInstance().HandleExtraHidResponse(response);
std::vector<u8> response_buffer(sizeof(response));
memcpy(response_buffer.data(), &response, sizeof(response));

View file

@ -65,7 +65,7 @@ void IR_RST::UpdateCallback(u64 userdata, int cycles_late) {
s16 c_stick_x = static_cast<s16>(c_stick_x_f * MAX_CSTICK_RADIUS);
s16 c_stick_y = static_cast<s16>(c_stick_y_f * MAX_CSTICK_RADIUS);
Movie::HandleIrRst(state, c_stick_x, c_stick_y);
Core::Movie::GetInstance().HandleIrRst(state, c_stick_x, c_stick_y);
if (!raw_c_stick) {
const HID::DirectionState direction = HID::GetStickDirectionState(c_stick_x, c_stick_y);