Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

merged with latest sources

  • Loading branch information
DavidLudwig committed Nov 4, 2012
2 parents 4a1a0a0 + 88c9667 commit a0fea7d46b4de3954998ac4ca955b80a3d6dce2a
Showing with 2,624 additions and 534 deletions.
  1. +1 −0 Makefile.in
  2. +1 −2 README.Platforms
  3. +68 −8 README.android
  4. +8 −0 VisualC/SDL/SDL_VS2008.vcproj
  5. +2 −0 VisualC/SDL/SDL_VS2010.vcxproj
  6. +14 −2 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
  7. +3 −5 Xcode/SDL/Info-Framework.plist
  8. +28 −4 Xcode/SDL/SDL.xcodeproj/project.pbxproj
  9. +4 −2 acinclude/libtool.m4
  10. +4 −2 aclocal.m4
  11. +25 −3 android-project/AndroidManifest.xml
  12. +17 −0 android-project/ant.properties
  13. +77 −51 android-project/build.xml
  14. +1 −1 android-project/default.properties
  15. +4 −0 android-project/jni/Application.mk
  16. +1 −1 android-project/local.properties
  17. +20 −0 android-project/proguard-project.txt
  18. +14 −0 android-project/project.properties
  19. +1 −1 android-project/src/org/libsdl/app/SDLActivity.java
  20. +10 −5 configure
  21. +2 −1 configure.in
  22. +1 −0 include/SDL.h
  23. +1 −1 include/SDL_config.h
  24. +2 −0 include/SDL_config.h.in
  25. +7 −0 include/SDL_config_windows.h
  26. +10 −1 include/SDL_events.h
  27. +3 −1 include/SDL_log.h
  28. +147 −0 include/SDL_messagebox.h
  29. +12 −6 include/SDL_rwops.h
  30. +5 −3 include/SDL_stdinc.h
  31. +38 −1 include/SDL_system.h
  32. +77 −209 src/SDL_assert.c
  33. +23 −3 src/SDL_log.c
  34. +11 −2 src/audio/coreaudio/SDL_coreaudio.c
  35. +2 −0 src/audio/coreaudio/SDL_coreaudio.h
  36. +164 −12 src/core/android/SDL_android.cpp
  37. +2 −1 src/core/android/SDL_android.h
  38. +2 −2 src/core/windows/SDL_windows.h
  39. +98 −19 src/file/SDL_rwops.c
  40. +83 −59 src/stdlib/SDL_iconv.c
  41. +44 −9 src/thread/pthread/SDL_systhread.c
  42. +4 −0 src/video/SDL_sysvideo.h
  43. +78 −1 src/video/SDL_video.c
  44. +1 −0 src/video/cocoa/SDL_cocoaevents.m
  45. +29 −0 src/video/cocoa/SDL_cocoamessagebox.h
  46. +81 −0 src/video/cocoa/SDL_cocoamessagebox.m
  47. +17 −0 src/video/cocoa/SDL_cocoavideo.m
  48. +29 −0 src/video/uikit/SDL_uikitmessagebox.h
  49. +101 −0 src/video/uikit/SDL_uikitmessagebox.m
  50. +16 −0 src/video/uikit/SDL_uikitvideo.m
  51. +4 −4 src/video/uikit/SDL_uikitview.h
  52. +26 −38 src/video/uikit/SDL_uikitview.m
  53. +282 −0 src/video/windows/SDL_windowsmessagebox.c
  54. +29 −0 src/video/windows/SDL_windowsmessagebox.h
  55. +26 −1 src/video/x11/SDL_x11events.c
  56. +642 −0 src/video/x11/SDL_x11messagebox.c
  57. +28 −0 src/video/x11/SDL_x11messagebox.h
  58. +12 −0 src/video/x11/SDL_x11sym.h
  59. +2 −0 src/video/x11/SDL_x11video.c
  60. +2 −0 src/video/x11/SDL_x11video.h
  61. +8 −2 src/video/x11/SDL_x11window.c
  62. +47 −43 test/Makefile.in
  63. +6 −0 test/common.c
  64. +29 −16 test/configure
  65. +2 −12 test/configure.in
  66. +86 −0 test/testmessage.c
@@ -60,6 +60,7 @@ HDRS = \
SDL_loadso.h \
SDL_log.h \
SDL_main.h \
SDL_messagebox.h \
SDL_mouse.h \
SDL_mutex.h \
SDL_name.h \
@@ -11,13 +11,12 @@ Windows 7
Mac OS X 10.4+
Linux 2.6+
iOS 3.1.3+
Android 1.6+
Android 2.1+

Unofficially supported platforms
================================
(code compiles, but not thoroughly tested)
================================
Windows CE
FreeBSD
NetBSD
OpenBSD
@@ -39,18 +39,16 @@ src/main/android/SDL_android_main.cpp

Instructions:
1. Copy the android-project directory wherever you want to keep your projects and rename it to the name of your project.
2. Move this SDL directory into the <project>/jni directory and then copy
SDL_config_android.h to SDL_config.h inside the include folder
3. Place your application source files in the <project>/jni/src directory
4. Edit <project>/jni/src/Android.mk to include your source files
5. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
2. Move or symlink this SDL directory into the <project>/jni directory
3. Edit <project>/jni/src/Android.mk to include your source files
4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source

If you want to use the Eclipse IDE, skip to the Eclipse section below.

6. Edit <project>/local.properties to point to the Android SDK directory
7. Run 'ant debug' in android/project. This compiles the .java and eventually
5. Edit <project>/local.properties to point to the Android SDK directory
6. Run 'ant debug' in android/project. This compiles the .java and eventually
creates a .apk with the native code embedded
8. 'ant install' will push the apk to the device or emulator (if connected)
7. 'ant install' will push the apk to the device or emulator (if connected)

Here's an explanation of the files in the Android project, so you can customize them:

@@ -73,6 +71,58 @@ android-project/
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.


================================================================================
Customizing your application name
================================================================================

To customize your application name, edit AndroidManifest.xml and replace
"org.libsdl.app" with an identifier for your product package.

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:
--- MyGame.java --------------------------
package com.gamemaker.game;

import org.libsdl.app.SDLActivity;
import android.os.*;

/*
* A sample wrapper class that just calls SDLActivity
*/

public class MyGame extends SDLActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}

protected void onDestroy() {
super.onDestroy();
}
}
------------------------------------------

Then replace "SDLActivity" in AndroidManifest.xml with the name of your
class, .e.g. "MyGame"

================================================================================
Customizing your application icon
================================================================================

Conceptually changing your icon is just replacing the icon.png files in the
drawable directories under the res directory.

The easiest way to create a set of icons for your project is to remove all
the existing icon.png files, and then use the Eclipse IDE to create a dummy
project. During the process of doing this Eclipse will prompt you to create
an icon. Then just copy the drawable directories it creates over to your
res directory.

You may need to change the name of your icon in AndroidManifest.xml to match
the filename used by Eclipse.

================================================================================
Pause / Resume behaviour
================================================================================
@@ -105,6 +155,16 @@ Android_JNI_SetupThread before doing anything else otherwise SDL will attach
your thread automatically anyway (when you make an SDL call), but it'll never
detach it.

================================================================================
Using STL
================================================================================

You can use STL in your project by creating an Application.mk file in the jni
folder and adding the following line:
APP_STL := stlport_static

For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation.

================================================================================
Additional documentation
================================================================================
@@ -1216,6 +1216,14 @@
RelativePath="..\..\src\video\windows\SDL_windowskeyboard.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsmessagebox.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsmessagebox.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsmodes.c"
>
@@ -317,6 +317,7 @@
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmessagebox.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
@@ -432,6 +433,7 @@
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
@@ -156,6 +156,9 @@
AA7558C91595D55500BBD41B /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
AA7558CA1595D55500BBD41B /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
AA9781C91576A7FA00472542 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD6526630DE8FCCB002AD96B /* libSDL2.a */; };
AA9FF9511637C6E5000DF050 /* SDL_messagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */; };
AABCC3941640643D00AB8930 /* SDL_uikitmessagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */; };
AABCC3951640643D00AB8930 /* SDL_uikitmessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */; };
FD3F4A760DEA620800C5B771 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A700DEA620800C5B771 /* SDL_getenv.c */; };
FD3F4A770DEA620800C5B771 /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A710DEA620800C5B771 /* SDL_iconv.c */; };
FD3F4A780DEA620800C5B771 /* SDL_malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A720DEA620800C5B771 /* SDL_malloc.c */; };
@@ -410,6 +413,9 @@
AA7558951595D55500BBD41B /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_version.h; sourceTree = "<group>"; };
AA7558961595D55500BBD41B /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video.h; sourceTree = "<group>"; };
AA7558971595D55500BBD41B /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL.h; sourceTree = "<group>"; };
AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_messagebox.h; sourceTree = "<group>"; };
AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitmessagebox.h; sourceTree = "<group>"; };
AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitmessagebox.m; sourceTree = "<group>"; };
FD0BBFEF0E3933DD00D833B1 /* SDL_uikitview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitview.h; sourceTree = "<group>"; };
FD3F4A700DEA620800C5B771 /* SDL_getenv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_getenv.c; sourceTree = "<group>"; };
FD3F4A710DEA620800C5B771 /* SDL_iconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_iconv.c; sourceTree = "<group>"; };
@@ -853,6 +859,8 @@
FD689FCC0E26E9D400F90B21 /* SDL_uikitappdelegate.m */,
FD689F0C0E26E5D900F90B21 /* SDL_uikitevents.h */,
FD689F0D0E26E5D900F90B21 /* SDL_uikitevents.m */,
AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */,
AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */,
AA126AD21617C5E6005ABC8F /* SDL_uikitmodes.h */,
AA126AD31617C5E6005ABC8F /* SDL_uikitmodes.m */,
FD689F0E0E26E5D900F90B21 /* SDL_uikitopengles.h */,
@@ -894,13 +902,14 @@
children = (
AA7558651595D55500BBD41B /* begin_code.h */,
AA7558661595D55500BBD41B /* close_code.h */,
AA7558971595D55500BBD41B /* SDL.h */,
AA7558671595D55500BBD41B /* SDL_assert.h */,
AA7558681595D55500BBD41B /* SDL_atomic.h */,
AA7558691595D55500BBD41B /* SDL_audio.h */,
AA75586A1595D55500BBD41B /* SDL_blendmode.h */,
AA75586B1595D55500BBD41B /* SDL_clipboard.h */,
AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */,
AA75586D1595D55500BBD41B /* SDL_config.h */,
AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */,
AA75586E1595D55500BBD41B /* SDL_copying.h */,
AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */,
AA7558701595D55500BBD41B /* SDL_endian.h */,
@@ -916,6 +925,7 @@
AA75587A1595D55500BBD41B /* SDL_loadso.h */,
AA75587B1595D55500BBD41B /* SDL_log.h */,
AA75587C1595D55500BBD41B /* SDL_main.h */,
AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */,
AA75587D1595D55500BBD41B /* SDL_mouse.h */,
AA75587E1595D55500BBD41B /* SDL_mutex.h */,
AA75587F1595D55500BBD41B /* SDL_name.h */,
@@ -942,7 +952,6 @@
AA7558941595D55500BBD41B /* SDL_types.h */,
AA7558951595D55500BBD41B /* SDL_version.h */,
AA7558961595D55500BBD41B /* SDL_video.h */,
AA7558971595D55500BBD41B /* SDL.h */,
);
name = "Public Headers";
path = ../../include;
@@ -1249,6 +1258,8 @@
AA7558CA1595D55500BBD41B /* SDL.h in Headers */,
AA126AD41617C5E7005ABC8F /* SDL_uikitmodes.h in Headers */,
AA704DD6162AA90A0076D1C1 /* SDL_dropevents_c.h in Headers */,
AA9FF9511637C6E5000DF050 /* SDL_messagebox.h in Headers */,
AABCC3941640643D00AB8930 /* SDL_uikitmessagebox.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1467,6 +1478,7 @@
AA628ADB159369E3005138DD /* SDL_rotate.c in Sources */,
AA126AD51617C5E7005ABC8F /* SDL_uikitmodes.m in Sources */,
AA704DD7162AA90A0076D1C1 /* SDL_dropevents.c in Sources */,
AABCC3951640643D00AB8930 /* SDL_uikitmessagebox.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -4,25 +4,23 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>SDL</string>
<key>CFBundleGetInfoString</key>
<string>http://www.libsdl.org</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>SDL</string>
<string>org.libsdl.SDL2</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Simple DirectMedia Layer</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.0</string>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>1.3.0</string>
<string>2.0.0</string>
</dict>
</plist>

0 comments on commit a0fea7d

Please sign in to comment.