Fixed doxygen warnings and markdown formatting.
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 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
diff --git a/docs/README-android.md b/docs/README-android.md
index 04fb05b..7eee4ed 100644
--- a/docs/README-android.md
+++ b/docs/README-android.md
@@ -81,33 +81,33 @@ sdk.dir=PATH_TO_ANDROID_SDK
Here's an explanation of the files in the Android project, so you can customize them:
-android-project/
- AndroidManifest.xml - package manifest. Among others, it contains the class name
- of the main Activity and the package name of the application.
- build.properties - empty
- build.xml - build description file, used by ant. The actual application name
- is specified here.
- default.properties - holds the target ABI for the application, android-10 and up
- project.properties - holds the target ABI for the application, android-10 and up
- local.properties - holds the SDK path, you should change this to the path to your SDK
- jni/ - directory holding native code
- jni/Android.mk - Android makefile that can call recursively the Android.mk files
- in all subdirectories
- jni/SDL/ - (symlink to) directory holding the SDL library files
- jni/SDL/Android.mk - Android makefile for creating the SDL shared library
- jni/src/ - directory holding your C/C++ source
- jni/src/Android.mk - Android makefile that you should customize to include your
+ android-project/
+ AndroidManifest.xml - package manifest. Among others, it contains the class name
+ of the main Activity and the package name of the application.
+ build.properties - empty
+ build.xml - build description file, used by ant. The actual application name
+ is specified here.
+ default.properties - holds the target ABI for the application, android-10 and up
+ project.properties - holds the target ABI for the application, android-10 and up
+ local.properties - holds the SDK path, you should change this to the path to your SDK
+ jni/ - directory holding native code
+ jni/Android.mk - Android makefile that can call recursively the Android.mk files
+ in all subdirectories
+ jni/SDL/ - (symlink to) directory holding the SDL library files
+ jni/SDL/Android.mk - Android makefile for creating the SDL shared library
+ jni/src/ - directory holding your C/C++ source
+ jni/src/Android.mk - Android makefile that you should customize to include your
source code and any library references
- res/ - directory holding resources for your application
- res/drawable-* - directories holding icons for different phone hardware. Could be
- one dir called "drawable".
- res/layout/main.xml - Usually contains a file main.xml, which declares the screen layout.
- We don't need it because we use the SDL video output.
- res/values/strings.xml - strings used in your application, including the application name
- shown on the phone.
- src/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.
+ res/ - directory holding resources for your application
+ res/drawable-* - directories holding icons for different phone hardware. Could be
+ one dir called "drawable".
+ res/layout/main.xml - Usually contains a file main.xml, which declares the screen layout.
+ We don't need it because we use the SDL video output.
+ res/values/strings.xml - strings used in your application, including the application name
+ shown on the phone.
+ src/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.
================================================================================
@@ -141,6 +141,7 @@ To customize your application name, edit AndroidManifest.xml and replace
Then create a Java class extending SDLActivity and place it in a directory
under src matching your package, e.g.
+
src/com/gamemaker/game/MyGame.java
Here's an example of a minimal class file:
@@ -291,30 +292,39 @@ You can create and run an emulator from the Eclipse IDE:
* Window -> Android SDK and AVD Manager
You can see if adb can see any devices with the following command:
+
adb devices
You can see the output of log messages on the default device with:
+
adb logcat
You can push files to the device with:
+
adb push local_file remote_path_and_file
You can push files to the SD Card at /sdcard, for example:
+
adb push moose.dat /sdcard/moose.dat
You can see the files on the SD card with a shell command:
+
adb shell ls /sdcard/
You can start a command shell on the default device with:
+
adb shell
You can remove the library files of your project (and not the SDL lib files) with:
+
ndk-build clean
You can do a build with the following command:
+
ndk-build
You can see the complete command line that ndk-build is using by passing V=1 on the command line:
+
ndk-build V=1
If your application crashes in native code, you can use addr2line to convert the
@@ -334,7 +344,9 @@ For example, if your crash looks like this:
You can see that there's a crash in the C library being called from the main code.
I run addr2line with the debug version of my code:
+
arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so
+
and then paste in the number after "pc" in the call stack, from the line that I care about:
000014bc
@@ -342,9 +354,9 @@ I get output from addr2line showing that it's in the quit function, in testsprit
You can add logging to your code to help show what's happening:
-#include <android/log.h>
-
- __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x);
+ #include <android/log.h>
+
+ __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x);
If you need to build without optimization turned on, you can create a file called
"Application.mk" in the jni directory, with the following line in it:
@@ -357,7 +369,9 @@ APP_OPTIM := debug
The best (and slowest) way to debug memory issues on Android is valgrind.
Valgrind has support for Android out of the box, just grab code using:
+
svn co svn://svn.valgrind.org/valgrind/trunk valgrind
+
... and follow the instructions in the file README.android to build it.
One thing I needed to do on Mac OS X was change the path to the toolchain,
@@ -374,12 +388,15 @@ application with it, changing org.libsdl.app to your package identifier:
------------------------------------------
Then push it to the device:
+
adb push start_valgrind_app /data/local
and make it executable:
+
adb shell chmod 755 /data/local/start_valgrind_app
and tell Android to use the script to launch your application:
+
adb shell setprop wrap.org.libsdl.app "logwrapper /data/local/start_valgrind_app"
If the setprop command says "could not set property", it's likely that
@@ -390,9 +407,11 @@ You can then launch your application normally and waaaaaaaiiittt for it.
You can monitor the startup process with the logcat command above, and
when it's done (or even while it's running) you can grab the valgrind
output file:
+
adb pull /sdcard/valgrind.log
When you're done instrumenting with valgrind, you can disable the wrapper:
+
adb shell setprop wrap.org.libsdl.app ""
================================================================================
diff --git a/docs/doxyfile b/docs/doxyfile
index 151fa89..67bec11 100644
--- a/docs/doxyfile
+++ b/docs/doxyfile
@@ -1510,7 +1510,7 @@ DOTFILE_DIRS =
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-DOT_GRAPH_MAX_NODES = 50
+DOT_GRAPH_MAX_NODES = 60
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
# graphs generated by dot. A depth value of 3 means that only nodes reachable
diff --git a/include/SDL_egl.h b/include/SDL_egl.h
index 546a1a7..ed49a92 100644
--- a/include/SDL_egl.h
+++ b/include/SDL_egl.h
@@ -20,9 +20,9 @@
*/
/**
- * \file SDL_opengles.h
+ * \file SDL_egl.h
*
- * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
+ * This is a simple file to encapsulate the EGL API headers.
*/
#ifndef _MSC_VER
diff --git a/include/SDL_opengles2.h b/include/SDL_opengles2.h
index d7585d5..d245b8e 100644
--- a/include/SDL_opengles2.h
+++ b/include/SDL_opengles2.h
@@ -20,7 +20,7 @@
*/
/**
- * \file SDL_opengles.h
+ * \file SDL_opengles2.h
*
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
*/