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:
WarmUpTill
2024-05-01 21:06:32 +02:00
committed by WarmUpTill
parent edb2952fd6
commit efaf9a2ef3
9 changed files with 70 additions and 36 deletions

View File

@@ -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;
}