Skip to content

Commit

Permalink
fixed gamemode not switching if custom window title was empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne committed Aug 27, 2024
1 parent 0889644 commit bac3fb8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/BigPictureTV/bigpicturetv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,16 @@ void BigPictureTV::checkWindowTitle()
bool disableVideo = ui->disableMonitorCheckBox->isChecked();
bool disableAudio = ui->disableAudioCheckBox->isChecked();

if (isRunning && !gamemodeActive && !isSunshineStreaming() && !ui->customWindowLineEdit->hasFocus() && !ui->customWindowLineEdit->text().isEmpty()) {
bool customNotConfigured;
if (ui->targetWindowComboBox->currentIndex() == 1) {
if (ui->customWindowLineEdit->text().isEmpty() || ui->customWindowLineEdit->hasFocus()) {
customNotConfigured = true;
}
} else {
customNotConfigured = false;
}

if (isRunning && !gamemodeActive && !isSunshineStreaming() && !customNotConfigured) {
gamemodeActive = true;
handleActions(false);
handleMonitorChanges(false, disableVideo);
Expand Down

0 comments on commit bac3fb8

Please sign in to comment.