mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 12:18:35 -05:00
Add option to check if hotkey is released
This was already possible previously by inverting the logic with a "not", however, this should it make it more obvious that this type of check is possible.
This commit is contained in:
@@ -116,6 +116,9 @@ void Hotkey::Callback(void *data, obs_hotkey_id, obs_hotkey_t *, bool pressed)
|
||||
if (pressed) {
|
||||
hotkey->_lastPressed =
|
||||
std::chrono::high_resolution_clock::now();
|
||||
} else {
|
||||
hotkey->_lastReleased =
|
||||
std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
hotkey->_pressed = pressed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user