frontend: Use OBSBasic::Get() in all places
This reduces duplicated code when getting the OBSBasic context.
This commit is contained in:
parent
a562b8bf52
commit
4e8b131509
25 changed files with 75 additions and 78 deletions
|
|
@ -101,7 +101,7 @@ void OBSBasic::AddScene(OBSSource source)
|
|||
obs_hotkey_register_source(
|
||||
source, "OBSBasic.SelectScene", Str("Basic.Hotkeys.SelectScene"),
|
||||
[](void *data, obs_hotkey_id, obs_hotkey_t *, bool pressed) {
|
||||
OBSBasic *main = reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
|
||||
OBSBasic *main = OBSBasic::Get();
|
||||
|
||||
auto potential_source = static_cast<obs_source_t *>(data);
|
||||
OBSSourceAutoRelease source = obs_source_get_ref(potential_source);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue