wip: simulator: guard GenerateHostEvent

This feature is currently only available on Linux, but we don't want a
platform-specific guard - not in itself, anyway - so guard it with
`KALEIDOSCOPE_VIRTUAL_HOST_EVENTS`, _and_ a linux-guard within.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/851/head
Gergely Nagy 4 years ago
parent 8f7be391e5
commit 0454f8b66e
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -18,6 +18,12 @@
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#ifdef KALEIDOSCOPE_VIRTUAL_HOST_EVENTS
#ifndef __linux__
#error Generating host events is only supported on Linux at the moment.
#endif
#include "kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h" #include "kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h"
#include "kaleidoscope/simulator/reports/BootKeyboardReport.h" #include "kaleidoscope/simulator/reports/BootKeyboardReport.h"
#include "kaleidoscope/simulator/reports/KeyboardReport.h" #include "kaleidoscope/simulator/reports/KeyboardReport.h"
@ -396,4 +402,5 @@ bool GenerateHostEvent<AbsoluteMouseReport>::Action::evalInternal() {
#error __CLANG_ATOMIC_LLONG_LOCK_FREE #error __CLANG_ATOMIC_LLONG_LOCK_FREE
#endif #endif
#endif // KALEIDOSCOPE_VIRTUAL_HOST_EVENTS
#endif // KALEIDOSCOPE_VIRTUAL_BUILD #endif // KALEIDOSCOPE_VIRTUAL_BUILD

@ -19,6 +19,7 @@
#pragma once #pragma once
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD #ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#ifdef KALEIDOSCOPE_VIRTUAL_HOST_EVENTS
#include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h"
#include "kaleidoscope/simulator/interface/reports/Report_.h" #include "kaleidoscope/simulator/interface/reports/Report_.h"
@ -87,4 +88,5 @@ class GenerateHostEvent {
} // namespace simulator } // namespace simulator
} // namespace kaleidoscope } // namespace kaleidoscope
#endif // KALEIDOSCOPE_VIRTUAL_HOST_EVENTS
#endif // KALEIDOSCOPE_VIRTUAL_BUILD #endif // KALEIDOSCOPE_VIRTUAL_BUILD

Loading…
Cancel
Save