Comment 5 for bug 2027883

Revision history for this message
Johno Crawford (johno-crawford) wrote (last edit ):

But you are mixing USE_CHANNEL_MODE_ARGS and NUM_CHANNEL_MODES, to avoid changing the behaviour in code, use less cycles and keep features loosely coupled we could do something like this, wdyt?

--- old/ToyKeeper/spaghetti-monster/anduril/channel-modes.c 2023-08-25 22:21:04 +0000
+++ new/ToyKeeper/spaghetti-monster/anduril/channel-modes.c 2023-11-05 16:39:13 +0000
@@ -126,11 +126,14 @@
     if (cfg.simple_ui_active) {
         return EVENT_NOT_HANDLED;
     }
+ #if NUM_CHANNEL_MODES > 1
+ else
+ #endif
     #endif

     #if NUM_CHANNEL_MODES > 1
- // channel toggle menu on ... 9H?
- else if (event == EV_click9_hold) {
+ // channel toggle menu on ... 9H? (only if not in SIMPLE UI or if SIMPLE UI is inactive)
+ if (event == EV_click9_hold) {
         push_state(channel_mode_config_state, 0);
         return EVENT_HANDLED;
     }