diff options
| author | 2017-02-17 08:04:27 +0200 | |
|---|---|---|
| committer | 2017-02-16 22:04:27 -0800 | |
| commit | c7c1f56ce62b8250e5c777df9fbd62d19cf912c9 (patch) | |
| tree | cae969fabed7b7c8c370f429dc35d677727d4aff | |
| parent | Merge pull request #2573 from jfmherokiller/dragndrop (diff) | |
| download | yuzu-c7c1f56ce62b8250e5c777df9fbd62d19cf912c9.tar.gz yuzu-c7c1f56ce62b8250e5c777df9fbd62d19cf912c9.tar.xz yuzu-c7c1f56ce62b8250e5c777df9fbd62d19cf912c9.zip | |
HID: move enable_accelerometer/gyroscope_count initialization into Init() (#2574)
Fixes #2556
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index f14ab3811..fb3acb507 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -32,8 +32,8 @@ static u32 next_touch_index; | |||
| 32 | static u32 next_accelerometer_index; | 32 | static u32 next_accelerometer_index; |
| 33 | static u32 next_gyroscope_index; | 33 | static u32 next_gyroscope_index; |
| 34 | 34 | ||
| 35 | static int enable_accelerometer_count = 0; // positive means enabled | 35 | static int enable_accelerometer_count; // positive means enabled |
| 36 | static int enable_gyroscope_count = 0; // positive means enabled | 36 | static int enable_gyroscope_count; // positive means enabled |
| 37 | 37 | ||
| 38 | static int pad_update_event; | 38 | static int pad_update_event; |
| 39 | static int accelerometer_update_event; | 39 | static int accelerometer_update_event; |
| @@ -323,6 +323,9 @@ void Init() { | |||
| 323 | next_accelerometer_index = 0; | 323 | next_accelerometer_index = 0; |
| 324 | next_gyroscope_index = 0; | 324 | next_gyroscope_index = 0; |
| 325 | 325 | ||
| 326 | enable_accelerometer_count = 0; | ||
| 327 | enable_gyroscope_count = 0; | ||
| 328 | |||
| 326 | // Create event handles | 329 | // Create event handles |
| 327 | event_pad_or_touch_1 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch1"); | 330 | event_pad_or_touch_1 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch1"); |
| 328 | event_pad_or_touch_2 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch2"); | 331 | event_pad_or_touch_2 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch2"); |