xbmc/xbmc — pull request #4515 by mossywell (2014-04-04 18:28:53+00:00)
Title: Fix: Full screen toggle not working sometimes

To reproduce: exit XBMC windowed (or with a fresh install), set
true in advancedsettings.xml, and start XBMC. It
starts full screen but the full screen toggle doesn't work.

I think that the reason is that in Gotham, resolutions are no longer set
manually, so the code to set it has been removed in favour of changing the
settings. By default, the resolution setting is Windowed. At GUI Creation
time, it checks if the advanced setting for full screen is true and if the
current setting is Windowed. If so, it changes to full screen. This works,
but the argument to save the change is not present so defaults to false.
Therefore, the screen is full screen but the setting stays as windowed. When
toggling, it tries to go from full screen to windowed but the fact that the
setting is already windowed stops the change from happening.

Setting the save option to true causes XBMC to crash because (I think) the
GUI is created before the database is initialised, so it can't save the
setting.

To fix it, I created a flag that notes that the screen has changed and then at
the end of Initialise it checks the flag and if true, it then saves the change.

Tested on Windows.