UI: Add OBSBasic::ClearHotkeys function
Add a function to clear basic window hotkeys to reduces potential code duplication
This commit is contained in:
@@ -906,6 +906,12 @@ void OBSBasic::CreateHotkeys()
|
||||
#undef MAKE_CALLBACK
|
||||
}
|
||||
|
||||
void OBSBasic::ClearHotkeys()
|
||||
{
|
||||
obs_hotkey_pair_unregister(streamingHotkeys);
|
||||
obs_hotkey_pair_unregister(recordingHotkeys);
|
||||
}
|
||||
|
||||
OBSBasic::~OBSBasic()
|
||||
{
|
||||
bool previewEnabled = obs_preview_enabled();
|
||||
@@ -920,8 +926,7 @@ OBSBasic::~OBSBasic()
|
||||
os_cpu_usage_info_destroy(cpuUsageInfo);
|
||||
|
||||
obs_hotkey_set_callback_routing_func(nullptr, nullptr);
|
||||
obs_hotkey_pair_unregister(streamingHotkeys);
|
||||
obs_hotkey_pair_unregister(recordingHotkeys);
|
||||
ClearHotkeys();
|
||||
|
||||
service = nullptr;
|
||||
outputHandler.reset();
|
||||
|
@@ -122,6 +122,7 @@ private:
|
||||
|
||||
void InitHotkeys();
|
||||
void CreateHotkeys();
|
||||
void ClearHotkeys();
|
||||
|
||||
bool InitService();
|
||||
|
||||
|
Reference in New Issue
Block a user