pelya / commandergenius

Port of SDL library and several games to the Android OS.
http://libsdl-android.sourceforge.net/
GNU Lesser General Public License v2.1
532 stars 250 forks source link

SDL resets when native Android display resolution changes #24

Open sunaku opened 10 years ago

sunaku commented 10 years ago

Hello,

As described in issue 3 of XServer XSDL, the SDL app resets itself whenever the native Android display resolution changes.

For example, when I connect my Android device to my computer monitor via HDMI, I increase Android's native display resolution to 1920x1080 using these Android shell commands:

wm resize 1920x1080
wm density 160

This causes any existing SDL apps to reset themselves (I am shown the initial SDL logo screen again --- with the "Change device configuration" button at the top of the screen) and thus lose their state/progress.

Please make SDL resilient to native Android resolution changes so that I don't lose state/progress in my SDL apps (XServer XSDL, OpenTyrian, and more!).

Thanks for your consideration.

pelya commented 9 years ago

I've poked around a bit with changing resolution or using Samsung's multi window feature, which is essentially the same, and there's no easy way to reinit SDL code to switch to different resolution, so now SDL will gracefully kill itself and restart instead of crashing. Maybe I'll fix it someday, but for me it's rather low priority.