mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Fixed detection and control behaviour for some functions used by Preview API
This commit is contained in:
parent
8c4bd91c78
commit
ff8eda3682
10
Utils.cpp
10
Utils.cpp
@ -261,7 +261,7 @@ bool Utils::IsPreviewModeActive()
|
||||
bool buttonToggledOn = GetPreviewModeButtonControl()->isChecked();
|
||||
|
||||
// Clue 2 : Preview layout has more than one item
|
||||
int previewChildCount = GetPreviewLayout()->children().count();
|
||||
int previewChildCount = GetPreviewLayout()->count();
|
||||
blog(LOG_INFO, "preview layout children count : %d", previewChildCount);
|
||||
|
||||
return buttonToggledOn || (previewChildCount >= 2);
|
||||
@ -269,17 +269,19 @@ bool Utils::IsPreviewModeActive()
|
||||
|
||||
void Utils::EnablePreviewMode()
|
||||
{
|
||||
GetPreviewModeButtonControl()->setChecked(true);
|
||||
if (!IsPreviewModeActive())
|
||||
GetPreviewModeButtonControl()->click();
|
||||
}
|
||||
|
||||
void Utils::DisablePreviewMode()
|
||||
{
|
||||
GetPreviewModeButtonControl()->setChecked(false);
|
||||
if (IsPreviewModeActive())
|
||||
GetPreviewModeButtonControl()->click();
|
||||
}
|
||||
|
||||
void Utils::TogglePreviewMode()
|
||||
{
|
||||
GetPreviewModeButtonControl()->toggle();
|
||||
GetPreviewModeButtonControl()->click();
|
||||
}
|
||||
|
||||
const char* Utils::GetPreviewSceneName()
|
||||
|
Loading…
x
Reference in New Issue
Block a user