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
|
|
@ -1852,7 +1852,7 @@ OBSPropertiesView *OBSBasicSettings::CreateEncoderPropertyView(const char *encod
|
|||
OBSPropertiesView *view;
|
||||
|
||||
if (path) {
|
||||
const OBSBasic *basic = reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
|
||||
const OBSBasic *basic = OBSBasic::Get();
|
||||
const OBSProfile ¤tProfile = basic->GetCurrentProfile();
|
||||
|
||||
const std::filesystem::path jsonFilePath = currentProfile.path / std::filesystem::u8path(path);
|
||||
|
|
@ -3233,7 +3233,7 @@ static void WriteJsonData(OBSPropertiesView *view, const char *path)
|
|||
if (!view || !WidgetChanged(view))
|
||||
return;
|
||||
|
||||
const OBSBasic *basic = reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
|
||||
const OBSBasic *basic = OBSBasic::Get();
|
||||
const OBSProfile ¤tProfile = basic->GetCurrentProfile();
|
||||
|
||||
const std::filesystem::path jsonFilePath = currentProfile.path / std::filesystem::u8path(path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue