Logic for choosing default display-mode is slightly wrong #149
Description
Found this while investigating #142 but the issues are definitely different (but perhaps the issue below is an influence on that issue?)...
Try this:
- Load NOOBS v1.3.2 onto a fresh SD card, and load it up on a Pi
- Wait until the list of OSes appears
- Don't install any OS, but press '2' on the keyboard to switch to HDMI safe mode
- The screen goes low-res
- Say 'Yes' to making it permanent
- Power off the Pi, and power it on again
- NOOBS loads up in low-res mode (as expected)
- Power off the Pi, and power it on again
- NOOBS boots up in high-res mode again (not expected!!)
I believe this occurs as a combination of https://github.com/raspberrypi/noobs/blob/master/recovery/main.cpp#L91 and https://github.com/raspberrypi/noobs/blob/master/recovery/main.cpp#L125 and https://github.com/raspberrypi/noobs/blob/master/recovery/mainwindow.cpp#L172 - as far as NOOBS is concerned, there's absolutely no difference between no 'display' option being specified in recovery.cmdline, and the display=1 option being specified. But I believe there needs to be a distinction made (perhaps defaultDisplay
in main.cpp should be initialised to "-1" ?), so that NOOBS can tell the difference between "no display option specified, so stick to the previous default" and "a display option was specified, so override the default".