From 9cd8e4a53a380627ea98b1cef0556511ee45f570 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Sun, 25 Aug 2019 09:48:55 +0200 Subject: [PATCH] [chore] Work around weird LDoc bug Using two `@fixme` tags directly following each other can result in a crash. See for the upstream issue. --- frontend/device/input.lua | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/device/input.lua b/frontend/device/input.lua index c88bd88ef..1b53155ad 100644 --- a/frontend/device/input.lua +++ b/frontend/device/input.lua @@ -1,6 +1,6 @@ --[[-- An interface to get input events. -]] +--]] local DataStorage = require("datastorage") local DEBUG = require("dbg") @@ -194,10 +194,11 @@ function Input:init() end --[[-- -wrapper for FFI input open +Wrapper for FFI input open. Note that we adhere to the "." syntax here for compatibility. -TODO: clean up separation FFI/this + +@todo Clean up separation FFI/this. --]] function Input.open(device, is_emu_events) input.open(device, is_emu_events and 1 or 0) @@ -416,10 +417,12 @@ function Input:handleKeyBoardEv(ev) or keycode == "LPgFwd" or keycode == "RPgFwd" then --- @fixme Crappy event staggering! - -- The Forma repeats every 80ms after a 400ms delay, and 500ms roughly corresponds to a flashing update, - -- so stuff is usually in sync when you release the key. - -- Obvious downside is that this ends up slower than just mashing the key. - --- @fixme A better approach would be an onKeyRelease handler that flushes the Event queue... + -- + -- The Forma repeats every 80ms after a 400ms delay, and 500ms roughly corresponds to a flashing update, + -- so stuff is usually in sync when you release the key. + -- Obvious downside is that this ends up slower than just mashing the key. + -- + -- A better approach would be an onKeyRelease handler that flushes the Event queue... self.repeat_count = self.repeat_count + 1 if self.repeat_count == 1 then return Event:new("KeyRepeat", key) @@ -667,7 +670,7 @@ function Input:handleOasisOrientationEv(ev) end end --- Accelerometer on the Forma, c.f., drivers/hwmon/mma8x5x.c +--- Accelerometer on the Forma, c.f., drivers/hwmon/mma8x5x.c function Input:handleMiscEvNTX(ev) local rotation_mode, screen_mode if ev.code == MSC_RAW then @@ -712,7 +715,7 @@ function Input:handleMiscEvNTX(ev) end end --- Allow toggling it at runtime +--- Allow toggling the accelerometer at runtime. function Input:toggleMiscEvNTX(toggle) if toggle and toggle == true then -- Honor Gyro events