DEADSOFTWARE

Now ported to android!
[d2df-sdl.git] / android / src / org / libsdl / app / SDL.java
1 package org.libsdl.app;
3 import android.content.Context;
5 /**
6 SDL library initialization
7 */
8 public class SDL {
10 // This function should be called first and sets up the native code
11 // so it can call into the Java classes
12 public static void setupJNI() {
13 SDLActivity.nativeSetupJNI();
14 SDLAudioManager.nativeSetupJNI();
15 SDLControllerManager.nativeSetupJNI();
16 }
18 // This function should be called each time the activity is started
19 public static void initialize() {
20 setContext(null);
22 SDLActivity.initialize();
23 SDLAudioManager.initialize();
24 SDLControllerManager.initialize();
25 }
27 // This function stores the current activity (SDL or not)
28 public static void setContext(Context context) {
29 mContext = context;
30 }
32 public static Context getContext() {
33 return mContext;
34 }
36 protected static Context mContext;
37 }