Skip to content

Commit

Permalink
Fix prevSubtitle and nextSubtitle when none subtitle is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
smplayer-dev committed Jun 10, 2023
1 parent 84aed01 commit 23a177c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3946,7 +3946,9 @@ void Core::prevSubtitle() {
qDebug("Core::prevSubtitle");

if (mset.subs.numItems() > 0) {
if (mset.current_subtitle_track == MediaSettings::SubNone) {
if (mset.current_subtitle_track == MediaSettings::SubNone ||
mset.current_subtitle_track == MediaSettings::NoneSelected)
{
changeSubtitle(mset.subs.numItems() - 1);
} else {
int item = mset.current_subtitle_track - 1;
Expand All @@ -3960,7 +3962,9 @@ void Core::nextSubtitle() {
qDebug("Core::nextSubtitle");

if (mset.subs.numItems() > 0) {
if (mset.current_subtitle_track == MediaSettings::SubNone) {
if (mset.current_subtitle_track == MediaSettings::SubNone ||
mset.current_subtitle_track == MediaSettings::NoneSelected)
{
changeSubtitle(0);
} else {
int item = mset.current_subtitle_track + 1;
Expand Down

0 comments on commit 23a177c

Please sign in to comment.