From ac99e4b90551d912613abe11d3f55e3efdb2b99d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 4 Oct 2018 00:33:23 +0200 Subject: HeadphoneKey: Update for latest dome-key-map API There is no longer a return value for `c_run_key_action()`, and the `CKeyActionResult` struct no longer exists. Update the code to reflect this. --- DomeKey/HeadphoneKey.h | 1 - DomeKey/HeadphoneKey.m | 15 +-------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/DomeKey/HeadphoneKey.h b/DomeKey/HeadphoneKey.h index 3be7148..861621f 100644 --- a/DomeKey/HeadphoneKey.h +++ b/DomeKey/HeadphoneKey.h @@ -29,6 +29,5 @@ static const unsigned int TIMEOUT_MILLISECONDS = 1000; - (void)handleDeadKey:(HeadphoneButton)button; - (void)runAction; -- (const Trigger *)maybeSwitchToMode:(const CKeyActionResult *)result; @end diff --git a/DomeKey/HeadphoneKey.m b/DomeKey/HeadphoneKey.m index 9d3a9fb..1556427 100644 --- a/DomeKey/HeadphoneKey.m +++ b/DomeKey/HeadphoneKey.m @@ -83,22 +83,9 @@ .length = count }; - const CKeyActionResult *result = c_run_key_action(_state, trigger, _in_mode); + c_run_key_action(_state, trigger, _in_mode); [_key_buffer removeAllObjects]; } -- (const Trigger *)maybeSwitchToMode:(const CKeyActionResult *)result -{ - // if _in_mode is not null, nullify it - // TODO: rename this method - - if (result->kind && - *result->kind == ActionKind_Mode) { - _in_mode = result->in_mode; - } - - return _in_mode; -} - @end -- cgit v1.2.3