Skip to content

emulationstation-standalone: read global.videooutput2 default via -master too - #16407

Closed
Pyohwan wants to merge 1 commit into
batocera-linux:masterfrom
Pyohwan:upstream-es-videooutput2-master
Closed

Pyohwan wants to merge 1 commit into
batocera-linux:masterfrom
Pyohwan:upstream-es-videooutput2-master

Conversation

@Pyohwan

@Pyohwan Pyohwan commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

If screen2 is unset, the script auto-picks a second output. It decides this by checking global.videooutput2 with the plain lookup, but that lookup only sees user overrides in /userdata/system/batocera.conf. It doesn't see sysconfig-level board defaults. Every other read of this setting in the script already uses -master, which does see those defaults.

So a board default like global.videooutput2=none (meaning "don't auto-pick a second output") gets missed here, and the code picks one anyway.

Confirmed live: with the sysconfig default in place and no user override, a second output kept getting auto-selected on every restart.

No board upstream sets global.videooutput2=none right now, so this isn't hurting anyone else yet. But any board that wants no second output by default will hit the same problem. Better to fix it now than wait for another board to run into it.

Fix: use -master here too, same as every other read of this setting in the script.

…ster too

Every other read of global.videooutput2 in this script uses -master (sees
sysconfig-level board defaults, not just user overrides). This one fallback
still used the plain lookup, so a board default like ODROID-M1's
global.videooutput2=none was invisible here, and a second output got
auto-selected anyway.

Confirmed live: with the sysconfig default in place and no user override,
DSI-1 kept getting auto-selected as a second output every restart.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S6emcPYtMgjwcmPBmUt74u
@Pyohwan
Pyohwan marked this pull request as ready for review September 9, 2026 13:07
@nadenislamarre

Copy link
Copy Markdown
Collaborator

please dont merge. ill check, but im almost sure this fix is not correct

@nadenislamarre

Copy link
Copy Markdown
Collaborator

i make sense. i read incorrectly the contrary when i read.

@nadenislamarre

Copy link
Copy Markdown
Collaborator

a contrario, i don't get why we take non-master after master:
# Attempt to get video outputs from master settings first
settings_output=$(batocera-settings-get-master global.videooutput)
settings_output2=$(batocera-settings-get-master global.videooutput2)
settings_output3=$(batocera-settings-get-master global.videooutput3)

# If master settings are not found, try the regular settings                                                                                                                                                                      
if [ -z "$settings_output" ] && [ -z "$settings_output2" ] && [ -z "$settings_output3" ]; then
    echo "Standalone: Master video outputs not found, trying default" >> "$log"
    settings_output=$(batocera-settings-get global.videooutput)
    settings_output2=$(batocera-settings-get global.videooutput2)
    settings_output3=$(batocera-settings-get global.videooutput3)
fi

and there are some other places where master should be taken.

@nadenislamarre

Copy link
Copy Markdown
Collaborator

i would prefer something like this one https://github.com/batocera-linux/batocera.linux/pull/16449/changes

@dmanlfc do you remember why you added a non master check after a check ? (while -master lookup in user settings first)

@nadenislamarre

Copy link
Copy Markdown
Collaborator

#16449 merged.
this one can be close.

@dmanlfc dmanlfc closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants