Fix GitHub display of README-android.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
diff --git a/docs/README-android.md b/docs/README-android.md
index 4b7fefe..8b626f6 100644
--- a/docs/README-android.md
+++ b/docs/README-android.md
@@ -10,8 +10,7 @@ If you are using the older ant build process, it is no longer officially
supported, but you can use the "android-project-ant" directory as a template.
-================================================================================
- Requirements
+Requirements
================================================================================
Android SDK (version 26 or later)
@@ -23,8 +22,7 @@ https://developer.android.com/tools/sdk/ndk/index.html
Minimum API level supported by SDL: 16 (Android 4.1)
-================================================================================
- How the port works
+How the port works
================================================================================
- Android applications are Java-based, optionally with parts written in C
@@ -42,8 +40,7 @@ dispatches to native functions implemented in the SDL library:
src/core/android/SDL_android.c
-================================================================================
- Building an app
+Building an app
================================================================================
For simple projects you can use the script located at build-scripts/androidbuild.sh
@@ -120,8 +117,7 @@ Here's an explanation of the files in the Android project, so you can customize
src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application.
-================================================================================
- Customizing your application name
+Customizing your application name
================================================================================
To customize your application name, edit AndroidManifest.xml and replace
@@ -151,8 +147,7 @@ Then replace "SDLActivity" in AndroidManifest.xml with the name of your
class, .e.g. "MyGame"
-================================================================================
- Customizing your application icon
+Customizing your application icon
================================================================================
Conceptually changing your icon is just replacing the "ic_launcher.png" files in
@@ -160,8 +155,7 @@ the drawable directories under the res directory. There are several directories
for different screen sizes.
-================================================================================
- Loading assets
+Loading assets
================================================================================
Any files you put in the "app/src/main/assets" directory of your project
@@ -189,8 +183,7 @@ disable this behaviour, see for example:
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
-================================================================================
- Pause / Resume behaviour
+Pause / Resume behaviour
================================================================================
If SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default),
@@ -217,8 +210,7 @@ You should not use the SDL renderer API while the app going in background:
GL context is restored, and the SDL renderer API is available (unless you
receive SDL_RENDER_DEVICE_RESET).
-================================================================================
- Mouse / Touch events
+Mouse / Touch events
================================================================================
In some case, SDL generates synthetic mouse (resp. touch) events for touch
@@ -227,8 +219,7 @@ To enable/disable this behavior, see SDL_hints.h:
- SDL_HINT_TOUCH_MOUSE_EVENTS
- SDL_HINT_MOUSE_TOUCH_EVENTS
-================================================================================
- Misc
+Misc
================================================================================
For some device, it appears to works better setting explicitly GL attributes
@@ -237,8 +228,7 @@ before creating a window:
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
-================================================================================
- Threads and the Java VM
+Threads and the Java VM
================================================================================
For a quick tour on how Linux native threads interoperate with the Java VM, take
@@ -253,8 +243,7 @@ your thread automatically anyway (when you make an SDL call), but it'll never
detach it.
-================================================================================
- Using STL
+Using STL
================================================================================
You can use STL in your project by creating an Application.mk file in the jni
@@ -266,8 +255,7 @@ For more information go here:
https://developer.android.com/ndk/guides/cpp-support
-================================================================================
- Using the emulator
+Using the emulator
================================================================================
There are some good tips and tricks for getting the most out of the
@@ -279,8 +267,7 @@ Notice that this software emulator is incredibly slow and needs a lot of disk sp
Using a real device works better.
-================================================================================
- Troubleshooting
+Troubleshooting
================================================================================
You can see if adb can see any devices with the following command:
@@ -359,8 +346,7 @@ If you need to build without optimization turned on, you can create a file calle
APP_OPTIM := debug
-================================================================================
- Memory debugging
+Memory debugging
================================================================================
The best (and slowest) way to debug memory issues on Android is valgrind.
@@ -411,8 +397,7 @@ When you're done instrumenting with valgrind, you can disable the wrapper:
adb shell setprop wrap.org.libsdl.app ""
-================================================================================
- Graphics debugging
+Graphics debugging
================================================================================
If you are developing on a compatible Tegra-based tablet, NVidia provides
@@ -425,8 +410,7 @@ The Tegra Graphics Debugger is available from NVidia here:
https://developer.nvidia.com/tegra-graphics-debugger
-================================================================================
- Why is API level 16 the minimum required?
+Why is API level 16 the minimum required?
================================================================================
The latest NDK toolchain doesn't support targeting earlier than API level 16.
@@ -435,8 +419,7 @@ about 99% of the Android devices accessing Google Play support API level 16 or
higher (January 2018).
-================================================================================
- A note regarding the use of the "dirty rectangles" rendering technique
+A note regarding the use of the "dirty rectangles" rendering technique
================================================================================
If your app uses a variation of the "dirty rectangles" rendering technique,
@@ -454,8 +437,7 @@ screen each frame.
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
-================================================================================
- Ending your application
+Ending your application
================================================================================
Two legitimate ways:
@@ -472,8 +454,7 @@ Don't call exit() as it stops the activity badly.
NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode
SDLK_AC_BACK, for any purpose.
-================================================================================
- Known issues
+Known issues
================================================================================
- The number of buttons reported for each joystick is hardcoded to be 36, which