Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing overscan in raspi-config breaks config.txt overscan settings, screws up EmulationStation in RetroPie #73

Open
battaglia01 opened this issue Jun 23, 2018 · 0 comments

Comments

@battaglia01
Copy link

The EmulationStation software in RetroPie depends on the setting overscan_scale=1 being set in /boot/config.txt. If you use raspi-config to change the overscan settings, however, it comments this line out and there is no way to fix it other than changing the file again manually. The error is here at line 165 (164-169 shown)

  if [ "$1" -eq 0 ]; then # disable overscan
    sed $CONFIG -i -e "s/^overscan_/#overscan_/"
    set_config_var disable_overscan 1 $CONFIG
  else # enable overscan
    set_config_var disable_overscan 0 $CONFIG
  fi

It's that sed $CONFIG -i -e "s/^overscan_/#overscan_/" that does it. After setting disable overscan, it comments out everything beginning with overscan_ in the file, breaking overscan_scale, and then does not uncomment when you re-enable overscan. As a result, EmulationStation's overscan settings break.

The cleanest way to do this would be to tag the commented lines, for instance by changing them from overscan_* to ##raspi-config##overscan_. Having three hashtags indicates that this was commented from raspi-config. Then, when we re-enable, just search for all ##raspi-config##overscan_ instances and replace back to overscan_.

Another way would be to just drop the line entirely - if we're setting disable_overscan=1, does it really matter if we have other overscan settings also set in the file? Overscan is disabled, so wouldn't it just ignore those?

I'd be happy to write a quick PR for this as it's two lines of code, but I'm not sure if this is being maintained.

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

No branches or pull requests

1 participant