mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 04:09:59 +01:00
Changed mechanism of Source Callback and Input Mapping
Session stores list of all callback instances and reacts on input release by calling the reverse callback if it exists, or by finishing the ongoing callback. This means the behavior of Callbacks is different for those who are reversible (i.e. returns a non-null reverse) from those which do not have reverse. The reversible callbacks enforce to be exclusive while active (key pressed), others can be repeated and complementary (run in parallel).
This commit is contained in:
@@ -217,14 +217,14 @@ protected:
|
||||
struct InputSourceCallback {
|
||||
bool active_;
|
||||
SourceCallback *model_;
|
||||
std::map<uint64_t, SourceCallback *> reverse_;
|
||||
std::map<uint64_t, std::pair< SourceCallback *, SourceCallback *> > instances_;
|
||||
Target target_;
|
||||
InputSourceCallback() {
|
||||
active_ = false;
|
||||
model_ = nullptr;
|
||||
target_ = nullptr;
|
||||
}
|
||||
void clearReverse();
|
||||
void clear();
|
||||
};
|
||||
std::multimap<uint, InputSourceCallback> input_callbacks_;
|
||||
std::vector<Metronome::Synchronicity> input_sync_;
|
||||
|
||||
Reference in New Issue
Block a user