20. September 2017

SDL2 Android application crash on device rotation

If SDL2 application should support rotation it is necessary to add the following line to AndroidManifest.xml activity:


The XML will look like this:

        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />

The rotation of the application now works without problem:

Thanks to José Luis Pereira for the hint how to solve the issue.

The source code of the sample SDL2 application is stored at GitHub.

  • Quick search

  • Links

  • Twitter

    Follow @jurajmichalek on twitter.

  • Comments

  • Tags

  • Topics