Replace logic function with per-event callbacks in registry #86

Open
opened 2026-05-15 11:31:35 +00:00 by abart27 · 0 comments
abart27 commented 2026-05-15 11:31:35 +00:00 (Migrated from github.com)

This change would cut down quite a bit of code, while also making adding a mechanism to signal whether an event was handled (we don't do that currently, relying only on the rules of input capture instead) easier.

The change isn't quite trivial because we still have to return an actual primary value and meta table.

The primary value is easily handled by just writing it to control_data.primary (or some other place) in the event handlers and reading it back internally in ugui.control.

The meta table is more difficult to handle cleanly. I'll keep thinking about this :/

This change would cut down quite a bit of code, while also making adding a mechanism to signal whether an event was handled (we don't do that currently, relying only on the rules of input capture instead) easier. The change isn't quite trivial because we still have to return an actual primary value and meta table. The primary value is easily handled by just writing it to `control_data.primary` (or some other place) in the event handlers and reading it back internally in `ugui.control`. The meta table is more difficult to handle cleanly. I'll keep thinking about this :/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mupen64/ugui#86
No description provided.