Merge pull request #6 from keyboardio/h/init-order

Move Mouse & AbsoluteMouse initialization to MouseWrapper.begin
pull/365/head
Jesse Vincent 7 years ago committed by GitHub
commit 2a68b390ed

@ -112,6 +112,7 @@ MouseKeys_::MouseKeys_(void) {
void
MouseKeys_::begin(void) {
MouseWrapper.begin();
event_handler_hook_use(eventHandlerHook);
loop_hook_use(loopHook);
}

@ -14,6 +14,9 @@ boolean MouseWrapper_::is_warping;
uint8_t MouseWrapper_::accelStep;
MouseWrapper_::MouseWrapper_(void) {
}
void MouseWrapper_::begin(void) {
kaleidoscope::hid::initializeMouse();
kaleidoscope::hid::initializeAbsoluteMouse();
}

@ -31,6 +31,7 @@ class MouseWrapper_ {
public:
MouseWrapper_(void);
static void begin(void);
static void move(int8_t x, int8_t y);
static void warp(uint8_t warp_cmd);
static void pressButton(uint8_t button);

Loading…
Cancel
Save