Commit a64fc29c authored by Sam Lantinga's avatar Sam Lantinga

Merged Paul's Google Summer of Code work from SDL-gsoc2010_android

parents 238acbd5 0d3fdb86
# Makefile to build the SDL library
include ./android/config.cfg #get ANDROID_NDK
TOOLS_PATH=$(ANDROID_NDK)/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin
ANDROID_INCLUDES = -I$(ANDROID_NDK)/build/platforms/android-4/common/include \
-I$(ANDROID_NDK)/build/platforms/android-4/arch-arm/usr/include
INCLUDE = -I./include
CFLAGS = -g -O2 $(INCLUDE) $(ANDROID_INCLUDES) -DANDROID -DANDROID_NDK -static
AR = $(TOOLS_PATH)/arm-eabi-ar
RANLIB = $(TOOLS_PATH)/arm-eabi-ranlib
CC = $(TOOLS_PATH)/arm-eabi-gcc
CONFIG_H = include/SDL_config.h
TARGET = libSDL.a
SOURCES = \
src/*.c \
src/audio/*.c \
src/cpuinfo/*.c \
src/events/*.c \
src/file/*.c \
src/joystick/*.c \
src/haptic/*.c \
src/stdlib/*.c \
src/thread/*.c \
src/timer/*.c \
src/video/*.c \
src/power/*.c \
src/audio/android/*.c \
src/video/android/*.c \
src/joystick/android/*.c \
src/haptic/dummy/*.c \
src/atomic/dummy/*.c \
src/thread/pthread/*.c \
src/timer/unix/*.c \
src/loadso/dummy/*.c \
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
all: $(TARGET)
$(TARGET): $(CONFIG_H) $(OBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
$(CONFIG_H):
cp $(CONFIG_H).default $(CONFIG_H)
clean:
rm -f $(TARGET) $(OBJECTS)
================================================================================
Simple DirectMedia Layer for Android
================================================================================
Requirements: Android NDK r4 or later
================================================================================
How the port works
================================================================================
- Android applications are Java-based, optionally with parts written in C
- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to
the SDL library
- This means that your application C code must be placed inside an android
Java project, along with some C support code that communicates with Java
- This eventually produces a standard Android .apk package
================================================================================
Building an app
================================================================================
Instructions:
1. Edit android/config.cfg to point to the location of the NDK
2. Run 'make -f Makefile.android'. If all goes well, libsdl.a should be created
3. Place your application source files in android/project/jni
4. Edit the Android.mk to include your source files
5. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
6. Run 'ant' in android/testproject. This compiles the .java and eventually
creates a .apk with the C source embedded
7. 'ant install' will push the apk to the device or emulator (if connected)
================================================================================
Known issues
================================================================================
- SDL audio (although it's mostly written, just not working properly yet)
- TODO. I'm sure there's a bunch more stuff I haven't thought of
ANDROID_NDK=/home/paul/Projects/gsoc/sdk/android-ndk-r4
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.libsdl.app"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:name="SDLActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
# This file is used to override default values used by the Ant build system.
#
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.
<?xml version="1.0" encoding="UTF-8"?>
<project name="SDLApp" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked in in Version
Control Systems. -->
<property file="local.properties" />
<!-- The build.properties file can be created by you and is never touched
by the 'android' tool. This is the place to change some of the default property values
used by the Ant rules.
Here are some properties you may want to change/update:
application.package
the name of your application package as defined in the manifest. Used by the
'uninstall' rule.
source.dir
the name of the source directory. Default is 'src'.
out.dir
the name of the output directory. Default is 'bin'.
Properties related to the SDK location or the project target should be updated
using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your application and
should be checked in in Version Control Systems.
-->
<property file="build.properties" />
<!-- The default.properties file is created and updated by the 'android' tool, as well
as ADT.
This file is an integral part of the build system for your application and
should be checked in in Version Control Systems. -->
<property file="default.properties" />
<!-- Custom Android task to deal with the project target, and import the proper rules.
This requires ant 1.6.0 or above. -->
<path id="android.antlibs">
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
<pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
<pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
<pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
<pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
</path>
<taskdef name="setup"
classname="com.android.ant.SetupTask"
classpathref="android.antlibs" />
<!-- Execute the Android Setup task that will setup some properties specific to the target,
and import the build rules files.
The rules file is imported from
<SDK>/platforms/<target_platform>/templates/android_rules.xml
To customize some build steps for your project:
- copy the content of the main node <project> from android_rules.xml
- paste it in this build.xml below the <setup /> task.
- disable the import by changing the setup task below to <setup import="false" />
This will ensure that the properties are setup correctly but that your customized
build steps are used.
-->
<setup />
</project>
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-7
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := sdlapp
SDL := ../../../
LOCAL_CFLAGS := -DANDROID_NDK \
-DDISABLE_IMPORTGL \
-I$(SDL)/include
LOCAL_SRC_FILES := \
android-support.cpp \
lesson05.c \
LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lSDL -lgcc -L$(SDL)
include $(BUILD_SHARED_LIBRARY)
/*******************************************************************************
This file links the Java side of Android with libsdl
*******************************************************************************/
#include <jni.h>
#include <sys/time.h>
#include <time.h>
#include <android/log.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <pthread.h>
#define DEBUG
/*******************************************************************************
Globals
*******************************************************************************/
static long _getTime(void){
struct timeval now;
gettimeofday(&now, NULL);
return (long)(now.tv_sec*1000 + now.tv_usec/1000);
}
JNIEnv* mEnv = NULL;
JNIEnv* mAudioThreadEnv = NULL; //See the note below for why this is necessary
JavaVM* mVM = NULL;
//Main activity
jclass mActivityInstance;
//method signatures
jmethodID midCreateGLContext;
jmethodID midFlipBuffers;
jmethodID midEnableFeature;
jmethodID midUpdateAudio;
extern "C" int SDL_main();
extern "C" int Android_OnKeyDown(int keycode);
extern "C" int Android_OnKeyUp(int keycode);
extern "C" void Android_SetScreenResolution(int width, int height);
extern "C" void Android_OnResize(int width, int height, int format);
extern "C" int SDL_SendQuit();
extern "C" void Android_EnableFeature(int featureid, bool enabled);
//If we're not the active app, don't try to render
bool bRenderingEnabled = false;
//Feature IDs
static const int FEATURE_AUDIO = 1;
static const int FEATURE_ACCEL = 2;
//Accelerometer data storage
float fLastAccelerometer[3];
/*******************************************************************************
Functions called by JNI
*******************************************************************************/
//Library init
extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved){
JNIEnv* env = NULL;
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
return result;
}
mEnv = env;
__android_log_print(ANDROID_LOG_INFO, "SDL", "JNI: OnLoad");
jclass cls = mEnv->FindClass ("org/libsdl/app/SDLActivity");
mActivityInstance = cls;
midCreateGLContext = mEnv->GetStaticMethodID(cls,"createGLContext","()V");
midFlipBuffers = mEnv->GetStaticMethodID(cls,"flipBuffers","()V");
midEnableFeature = mEnv->GetStaticMethodID(cls,"enableFeature","(II)V");
midUpdateAudio = mEnv->GetStaticMethodID(cls,"updateAudio","([B)V");
if(!midCreateGLContext || !midFlipBuffers || !midEnableFeature ||
!midUpdateAudio){
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: Bad mids\n");
}else{
#ifdef DEBUG
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: Good mids\n");
#endif
}
return JNI_VERSION_1_4;
}
//Start up the SDL app
extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit( JNIEnv* env,
jobject obj ){
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: Native Init");
mEnv = env;
bRenderingEnabled = true;
Android_EnableFeature(FEATURE_ACCEL, true);
SDL_main();
}
//Keydown
extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyDown(JNIEnv* env,
jobject obj, jint keycode){
int r = Android_OnKeyDown(keycode);
#ifdef DEBUG
__android_log_print(ANDROID_LOG_INFO, "SDL",
"SDL: native key down %d, %d\n", keycode, r);
#endif
}
//Keyup
extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyUp(JNIEnv* env,
jobject obj, jint keycode){
int r = Android_OnKeyUp(keycode);
#ifdef DEBUG
__android_log_print(ANDROID_LOG_INFO, "SDL",
"SDL: native key up %d, %d\n", keycode, r);
#endif
}
//Touch
extern "C" void Java_org_libsdl_app_SDLActivity_onNativeTouch(JNIEnv* env,
jobject obj, jint action, jfloat x, jfloat y, jfloat p){
#ifdef DEBUG
__android_log_print(ANDROID_LOG_INFO, "SDL",
"SDL: native touch event %d @ %f/%f, pressure %f\n",
action, x, y, p);
#endif
//TODO: Pass this off to the SDL multitouch stuff
}
//Quit
extern "C" void Java_org_libsdl_app_SDLActivity_nativeQuit( JNIEnv* env,
jobject obj ){
//Stop rendering as we're no longer in the foreground
bRenderingEnabled = false;
//Inject a SDL_QUIT event
int r = SDL_SendQuit();
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: Native quit %d", r);
}
//Screen size
extern "C" void Java_org_libsdl_app_SDLActivity_nativeSetScreenSize(
JNIEnv* env, jobject obj, jint width, jint height){
__android_log_print(ANDROID_LOG_INFO, "SDL",
"SDL: Set screen size on init: %d/%d\n", width, height);
Android_SetScreenResolution(width, height);
}
//Resize
extern "C" void Java_org_libsdl_app_SDLActivity_onNativeResize(
JNIEnv* env, jobject obj, jint width,
jint height, jint format){
Android_OnResize(width, height, format);
}
extern "C" void Java_org_libsdl_app_SDLActivity_onNativeAccel(
JNIEnv* env, jobject obj,
jfloat x, jfloat y, jfloat z){
fLastAccelerometer[0] = x;
fLastAccelerometer[1] = y;
fLastAccelerometer[2] = z;
}
/*******************************************************************************
Functions called by SDL into Java
*******************************************************************************/
extern "C" void Android_CreateContext(){
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: sdl_create_context()\n");
bRenderingEnabled = true;
mEnv->CallStaticVoidMethod(mActivityInstance, midCreateGLContext );
}
extern "C" void Android_Render(){
if(!bRenderingEnabled){
return;
}
//When we get here, we've accumulated a full frame
mEnv->CallStaticVoidMethod(mActivityInstance, midFlipBuffers );
}
extern "C" void Android_EnableFeature(int featureid, bool enabled){
mEnv->CallStaticVoidMethod(mActivityInstance, midEnableFeature,
featureid, (int)enabled);
}
extern "C" void Android_UpdateAudioBuffer(unsigned char *buf, int len){
//Annoyingly we can't just call into Java from any thread. Because the audio
//callback is dispatched from the SDL audio thread (that wasn't made from
//java, we have to do some magic here to let the JVM know about the thread.
//Because everything it touches on the Java side is static anyway, it's
//not a big deal, just annoying.
if(!mAudioThreadEnv){
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: Need to set up audio thread env\n");
mVM->AttachCurrentThread(&mAudioThreadEnv, NULL);
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: ok\n");
}
jbyteArray arr = mAudioThreadEnv->NewByteArray(len);
//blah. We probably should rework this so we avoid the copy.
mAudioThreadEnv->SetByteArrayRegion(arr, 0, len, (jbyte *)buf);
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: copied\n");
mAudioThreadEnv->CallStaticVoidMethod( mActivityInstance,
midUpdateAudio, arr );
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL: invoked\n");
}
This diff is collapsed.
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked in Version Control Systems,
# as it contains information specific to your local configuration.
# location of the SDK. This is only used by Ant
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/home/paul/Projects/gsoc/sdk/android-sdk-linux_86
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, SDLActivity"
/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">SDLActivity</string>
</resources>
This diff is collapsed.
#!/bin/bash
ANDROID_NDK="/home/paul/Projects/gsoc/sdk/android-ndk-r4"
TOOLS_PATH="$ANDROID_NDK/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin"
export PATH=$TOOLS_PATH:$PATH
CC="arm-eabi-gcc"
#cflags
ACC_C=" -I$ANDROID_NDK/build/platforms/android-8/common/include \
-I$ANDROID_NDK/build/platforms/android-8/arch-arm/usr/include \
-DANDROID -DANDROID_NDK -c"
$CC $CFLAGS $ACC_C $@
#!/bin/bash
ANDROID_NDK="/home/paul/Projects/gsoc/sdk/android-ndk-r4"
TOOLS_PATH="$ANDROID_NDK/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin"
ADDITIONAL_LIBS=`dirname "$0"`/android_libs/
export PATH=$TOOLS_PATH:$PATH
LD="arm-eabi-ld"
#ldflags
ACC_L=" -rpath-link=$ANDROID_NDK/build/platforms/android-8/arch-arm/usr/lib/ \
-dynamic-linker=/system/bin/linker \
-lc -nostdlib \
$ANDROID_NDK/build/platforms/android-8/arch-arm/usr/lib/crtbegin_static.o \
-L$ANDROID_NDK/build/platforms/android-8/arch-arm/usr/lib/ \
-L$ANDROID_NDK/build/prebuilt/linux-x86/arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1 \
-L$ADDITIONAL_LIBS "
$LD $ACC_L $LDFLAGS $@ -lgcc
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#ifndef _SDL_config_android_h
#define _SDL_config_android_h
#include "SDL_platform.h"
/**
* \file SDL_config_android.h
*
* This is a configuration that can be used to build SDL for Android
*/
#include <stdarg.h>
/*
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
*/
#define HAVE_ALLOCA_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
#define HAVE_SIGNAL_H 1
/* C library functions */
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ALLOCA 1
#define HAVE_GETENV 1
#define HAVE_SETENV 1
#define HAVE_PUTENV 1
#define HAVE_SETENV 1
#define HAVE_UNSETENV 1
#define HAVE_QSORT 1
#define HAVE_ABS 1
#define HAVE_BCOPY 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
#define HAVE_STRLCPY 1
#define HAVE_STRLCAT 1
#define HAVE_STRDUP 1
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_SSCANF 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_CEIL 1
#define HAVE_COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_LOG 1
#define HAVE_POW 1
#define HAVE_SCALBN 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SIGACTION 1
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1
#define HAVE_SYSCONF 1
#define SIZEOF_VOIDP 4
typedef unsigned int size_t;
//typedef unsigned long uintptr_t;
#define SDL_AUDIO_DRIVER_ANDROID 1
#define SDL_CDROM_DISABLED 1
#define SDL_HAPTIC_DISABLED 1
#define SDL_JOYSTICK_ANDROID 1
#define SDL_LOADSO_DISABLED 1
/* Enable various threading systems */
#define SDL_THREAD_PTHREAD 1
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
/* Enable various timer systems */
#define SDL_TIMER_UNIX 1
#define SDL_VIDEO_DRIVER_ANDROID 1
#define HAVE_STDIO_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_M_PI 1
#define SDL_VIDEO_RENDER_OGL_ES 1
#endif /* _SDL_config_minimal_h */
......@@ -65,6 +65,11 @@
#undef __LINUX__
#define __LINUX__ 1
#endif
#if defined(ANDROID)
#undef __ANDROID__
#undef __LINUX__ /*do we need to do this?*/
#define __ANDROID__ 1
#endif
#if defined(__APPLE__)
/* lets us know what version of Mac OS X we're compiling on */
......
......@@ -174,9 +174,10 @@ SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
#ifndef __NINTENDODS__ /* TODO: figure out why the following happens:
include/SDL_stdinc.h:150: error: size of array 'SDL_dummy_uint64' is negative
include/SDL_stdinc.h:151: error: size of array 'SDL_dummy_sint64' is negative */
#if !defined(__NINTENDODS__) && !defined(__ANDROID__)
/* TODO: figure out why the following happens:
include/SDL_stdinc.h:150: error: size of array 'SDL_dummy_uint64' is negative
include/SDL_stdinc.h:151: error: size of array 'SDL_dummy_sint64' is negative */
SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
#endif
......@@ -195,7 +196,8 @@ SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
/** \cond */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifndef __NINTENDODS__ /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
#if !defined(__NINTENDODS__) && !defined(__ANDROID__)
/* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
typedef enum
{
DUMMY_ENUM_VALUE
......
......@@ -639,18 +639,29 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
/* If we're in OpenGL mode, just create a stub surface and we're done! */
if (flags & SDL_OPENGL) {
printf("1\n");
SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow);
if (!SDL_VideoContext) {
return NULL;
}
printf("2\n");
if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) {
return NULL;
}
printf("3\n");
SDL_VideoSurface =
SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0);
if (!SDL_VideoSurface) {
return NULL;
}
printf("4\n");
SDL_VideoSurface->flags |= surface_flags;
SDL_PublicSurface = SDL_VideoSurface;
return SDL_PublicSurface;
......
......@@ -69,6 +69,7 @@ extern AudioBootStrap MMEAUDIO_bootstrap;
extern AudioBootStrap DART_bootstrap;
extern AudioBootStrap NDSAUD_bootstrap;
extern AudioBootStrap FUSIONSOUND_bootstrap;
extern AudioBootStrap ANDROIDAUD_bootstrap;
/* Available audio drivers */
......@@ -136,6 +137,9 @@ static const AudioBootStrap *const bootstrap[] = {
#endif
#if SDL_AUDIO_DRIVER_FUSIONSOUND
&FUSIONSOUND_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_ANDROID
&ANDROIDAUD_bootstrap,
#endif
NULL
};
......@@ -318,6 +322,8 @@ SDL_StreamDeinit(SDL_AudioStreamer * stream)
}
#include <android/log.h>
/* The general mixing thread function */
int SDLCALL
SDL_RunAudio(void *devicep)
......
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
This file written by Ryan C. Gordon (icculus@icculus.org)
*/
#include "SDL_config.h"
/* Output audio to Android */
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
#include "SDL_androidaudio.h"
extern void Android_UpdateAudioBuffer(unsigned char *buf, int len);
#include <android/log.h>
static int
AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture)
{
SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
int valid_datatype = 0;
//TODO: Sample rates etc
__android_log_print(ANDROID_LOG_INFO, "SDL", "AndroidAudio Open\n");
this->hidden = SDL_malloc(sizeof(*(this->hidden)));
if (!this->hidden) {
SDL_OutOfMemory();
return 0;
}
SDL_memset(this->hidden, 0, (sizeof *this->hidden));
while ((!valid_datatype) && (test_format)) {
this->spec.format = test_format;
switch (test_format) {
case AUDIO_S8:
/*case AUDIO_S16LSB: */
valid_datatype = 1;
break;
default:
test_format = SDL_NextAudioFormat();
break;
}
}
return 1;
}
static void
AndroidAUD_PlayDevice(_THIS)
{
__android_log_print(ANDROID_LOG_INFO, "SDL", "AndroidAudio Play\n");
//playGenericSound(this->hidden->mixbuf, this->hidden->mixlen);
#if 0
// sound->rate = 22050; /* sample rate = 22050Hz */
// sound->vol = 127; /* volume [0..127] for [min..max] */
// sound->pan = 64; /* balance [0..127] for [left..right] */
// sound->format = 0; /* 0 for 16-bit, 1 for 8-bit */
// playSound(sound);
#endif
}
static Uint8 *
AndroidAUD_GetDeviceBuf(_THIS)
{
//__android_log_print(ANDROID_LOG_INFO, "SDL", "****** get device buf\n");
// sound->data = this->hidden->mixbuf;/* pointer to raw audio data */
// sound->len = this->hidden->mixlen; /* size of raw data pointed to above */
Android_UpdateAudioBuffer(this->hidden->mixbuf, this->hidden->mixlen);
return this->hidden->mixbuf; /* is this right? */
}
static void
AndroidAUD_WaitDevice(_THIS)
{
/* stub */
__android_log_print(ANDROID_LOG_INFO, "SDL", "****** wait device buf\n");
}
static void
AndroidAUD_CloseDevice(_THIS)
{
/* stub */
__android_log_print(ANDROID_LOG_INFO, "SDL", "****** close device buf\n");
}
static int
AndroidAUD_Init(SDL_AudioDriverImpl * impl)
{
/* Set the function pointers */
impl->OpenDevice = AndroidAUD_OpenDevice;
impl->PlayDevice = AndroidAUD_PlayDevice;
impl->WaitDevice = AndroidAUD_WaitDevice;
impl->GetDeviceBuf = AndroidAUD_GetDeviceBuf;
impl->CloseDevice = AndroidAUD_CloseDevice;
/* and the capabilities */
impl->HasCaptureSupport = 0; //TODO
impl->OnlyHasDefaultOutputDevice = 1;
impl->OnlyHasDefaultInputDevice = 1;
__android_log_print(ANDROID_LOG_INFO, "SDL","Audio init\n");
return 1; /* this audio target is available. */
}
AudioBootStrap ANDROIDAUD_bootstrap = {
"android", "SDL Android audio driver", AndroidAUD_Init, 0 /*1? */
};
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#ifndef _SDL_androidaudio_h
#define _SDL_androidaudio_h
#include "../SDL_sysaudio.h"
/* Hidden "this" pointer for the audio functions */
#define _THIS SDL_AudioDevice *this
struct SDL_PrivateAudioData
{
/* The file descriptor for the audio device */
Uint8 *mixbuf;
Uint32 mixlen;
Uint32 write_delay;
Uint32 initial_calls;
};
#endif /* _SDL_androidaudio_h */
/* vi: set ts=4 sw=4 expandtab: */
......@@ -92,11 +92,13 @@ SDL_Unlock_EventThread(void)
static __inline__ SDL_bool
SDL_ShouldPollJoystick()
{
#if !SDL_JOYSTICK_DISABLED
if (SDL_numjoysticks &&
(!SDL_disabled_events[SDL_JOYAXISMOTION >> 8] ||
SDL_JoystickEventState(SDL_QUERY))) {
return SDL_TRUE;
}
#endif
return SDL_FALSE;
}
......
......@@ -729,7 +729,7 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode)
break;
default:
/* Invalid state -- bail */
return 0;
return 2;
}
/* Drop events that don't change state */
......@@ -738,14 +738,14 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode)
#if 0
printf("Keyboard event didn't change state - dropped!\n");
#endif
return 0;
return 3;
}
/* Update internal keyboard state */
keyboard->keystate[scancode] = state;
/* Post the event, if desired */
posted = 0;
posted = 4;
if (SDL_GetEventState(type) == SDL_ENABLE) {
SDL_Event event;
event.key.type = type;
......
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_ANDROID
/* This is the system specific header for the SDL joystick API */
#include <stdio.h> /* For the definition of NULL */
#include "SDL_error.h"
#include "SDL_events.h"
#include "SDL_joystick.h"
#include "../SDL_sysjoystick.h"
#include "../SDL_joystick_c.h"
extern float fLastAccelerometer[3];
const char *accelerometerName = "Android accelerometer";
/* Function to scan the system for joysticks.
* This function should set SDL_numjoysticks to the number of available
* joysticks. Joystick 0 should be the system default joystick.
* It should return 0, or -1 on an unrecoverable fatal error.
*/
int
SDL_SYS_JoystickInit(void)
{
SDL_numjoysticks = 1;
return (1);
}
/* Function to get the device-dependent name of a joystick */
const char *
SDL_SYS_JoystickName(int index)
{
if (!index)
return accelerometerName;
SDL_SetError("No joystick available with that index");
return (NULL);
}
/* Function to open a joystick for use.
The joystick to open is specified by the index field of the joystick.
This should fill the nbuttons and naxes fields of the joystick structure.
It returns 0, or -1 if there is an error.
*/
int
SDL_SYS_JoystickOpen(SDL_Joystick * joystick)
{
joystick->nbuttons = 0;
joystick->nhats = 0;
joystick->nballs = 0;
joystick->naxes = 3;
joystick->name = accelerometerName;
return 0;
}
/* Function to update the state of a joystick - called as a device poll.
* This function shouldn't update the joystick structure directly,
* but instead should call SDL_PrivateJoystick*() to deliver events
* and update joystick device state.
*/
void
SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
{
int i=0;
for(i=0;i<3;i++){
SDL_PrivateJoystickAxis(joystick, i, fLastAccelerometer[i]);
}
}
/* Function to close a joystick after use */
void
SDL_SYS_JoystickClose(SDL_Joystick * joystick)
{
}
/* Function to perform any system-specific joystick related cleanup */
void
SDL_SYS_JoystickQuit(void)
{
}
#endif /* SDL_JOYSTICK_NDS */
......@@ -417,6 +417,9 @@ extern VideoBootStrap NDS_bootstrap;
#if SDL_VIDEO_DRIVER_PANDORA
extern VideoBootStrap PND_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_ANDROID
extern VideoBootStrap Android_bootstrap;
#endif
#define SDL_CurrentDisplay (&_this->displays[_this->current_display])
#define SDL_CurrentRenderer (SDL_CurrentDisplay->current_renderer)
......
......@@ -96,6 +96,9 @@ static VideoBootStrap *bootstrap[] = {
#endif
#if SDL_VIDEO_DRIVER_PANDORA
&PND_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_ANDROID
&Android_bootstrap,
#endif
NULL
};
......
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/* Being a null driver, there's no event stream. We just define stubs for
most of the API. */
#include <stdio.h>
#include <stdlib.h>
#include "../../events/SDL_sysevents.h"
#include "../../events/SDL_events_c.h"
#include "SDL_androidevents.h"
void Android_InitEvents(){
SDL_Keyboard keyboard;
SDL_zero(keyboard);
SDL_AddKeyboard(&keyboard, -1);
SDLKey keymap[SDL_NUM_SCANCODES];
/* Add default scancode to key mapping */
SDL_GetDefaultKeymap(keymap);
SDL_SetKeymap(0, 0, keymap, SDL_NUM_SCANCODES);
}
void
Android_PumpEvents(_THIS)
{
//scanKeys();
/* TODO: defer click-age */
/*
if (keysDown() & KEY_TOUCH) {
SDL_SendMouseButton(0, SDL_PRESSED, 0);
} else if (keysUp() & KEY_TOUCH) {
SDL_SendMouseButton(0, SDL_RELEASED, 0);
}
if (keysHeld() & KEY_TOUCH) {
touchPosition t = touchReadXY();
SDL_SendMouseMotion(0, 0, t.px, t.py, 1);
}
*/
}
void Android_OnResize(int width, int height, int format){
}
int
Android_OnKeyDown(int keycode){
return SDL_SendKeyboardKey(0, SDL_PRESSED, (SDL_scancode)keycode);
}
int
Android_OnKeyUp(int keycode){
return SDL_SendKeyboardKey(0, SDL_RELEASED, (SDL_scancode)keycode);
}
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#include "SDL_androidvideo.h"
extern void Android_PumpEvents(_THIS);
extern void Android_InitEvents();
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/* Android SDL video driver implementation
*/
#include "SDL_video.h"
#include "SDL_mouse.h"
#include "../SDL_sysvideo.h"
#include "../SDL_pixels_c.h"
#include "../../events/SDL_events_c.h"
#include "SDL_androidvideo.h"
#include "SDL_androidevents.h"
#include "SDL_androidrender.h"
#include <android/log.h>
#include <pthread.h>
/*
These things are in the JNI android support
*/
extern void Android_CreateContext();
extern void Android_Render();
/* GL functions */
int Android_GL_LoadLibrary(_THIS, const char *path){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n");
return 0;
}
void *Android_GL_GetProcAddress(_THIS, const char *proc){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n");
return 0;
}
void Android_GL_UnloadLibrary(_THIS){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n");
}
/*
int *Android_GL_GetVisual(_THIS, Display * display, int screen){
__android_log_print(ANDROID_LOG_INFO, "SDL","[STUB] GL_GetVisual\n");
return 0;
}
*/
SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){
Android_CreateContext();
return 1;
}
int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
SDL_GLContext context){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n");
return 0;
}
int Android_GL_SetSwapInterval(_THIS, int interval){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n");
return 0;
}
int Android_GL_GetSwapInterval(_THIS){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n");
return 0;
}
void Android_GL_SwapWindow(_THIS, SDL_Window * window){
Android_Render();
}
void Android_GL_DeleteContext(_THIS, SDL_GLContext context){
__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n");
}
This diff is collapsed.
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/* SDL surface based renderer implementation */
extern SDL_RenderDriver Android_RenderDriver;
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/* Android SDL video driver implementation
*/
#include "SDL_video.h"
#include "SDL_mouse.h"
#include "../SDL_sysvideo.h"
#include "../SDL_pixels_c.h"
#include "../../events/SDL_events_c.h"
#include "SDL_androidvideo.h"
#include "SDL_androidevents.h"
#include "SDL_androidrender.h"
#define ANDROID_VID_DRIVER_NAME "Android"
/* Initialization/Query functions */
static int Android_VideoInit(_THIS);
static int Android_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
static void Android_VideoQuit(_THIS);
/* GL functions (SDL_androidgl.c) */
extern int Android_GL_LoadLibrary(_THIS, const char *path);
extern void *Android_GL_GetProcAddress(_THIS, const char *proc);
extern void Android_GL_UnloadLibrary(_THIS);
//extern int *Android_GL_GetVisual(_THIS, Display * display, int screen);
extern SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window);
extern int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
SDL_GLContext context);
extern int Android_GL_SetSwapInterval(_THIS, int interval);
extern int Android_GL_GetSwapInterval(_THIS);
extern void Android_GL_SwapWindow(_THIS, SDL_Window * window);
extern void Android_GL_DeleteContext(_THIS, SDL_GLContext context);
/* Android driver bootstrap functions */
//These are filled in with real values in Android_SetScreenResolution on
//init (before SDL_Main())
static int iScreenWidth = 320;
static int iScreenHeight = 240;
static int
Android_Available(void)
{
return 1;
}
static void
Android_DeleteDevice(SDL_VideoDevice * device)
{
SDL_free(device);
}
static SDL_VideoDevice *
Android_CreateDevice(int devindex)
{
printf("Creating video device\n");
SDL_VideoDevice *device;
/* Initialize all variables that we clean on shutdown */
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
if (!device) {
SDL_OutOfMemory();
if (device) {
SDL_free(device);
}
return (0);
}
/* Set the function pointers */
device->VideoInit = Android_VideoInit;
device->VideoQuit = Android_VideoQuit;
device->SetDisplayMode = Android_SetDisplayMode;
device->PumpEvents = Android_PumpEvents;
device->free = Android_DeleteDevice;
/* GL pointers */
device->GL_LoadLibrary = Android_GL_LoadLibrary;
device->GL_GetProcAddress = Android_GL_GetProcAddress;
device->GL_UnloadLibrary = Android_GL_UnloadLibrary;
device->GL_CreateContext = Android_GL_CreateContext;
device->GL_MakeCurrent = Android_GL_MakeCurrent;
device->GL_SetSwapInterval = Android_GL_SetSwapInterval;
device->GL_GetSwapInterval = Android_GL_GetSwapInterval;
device->GL_SwapWindow = Android_GL_SwapWindow;
device->GL_DeleteContext = Android_GL_DeleteContext;
return device;
}
VideoBootStrap Android_bootstrap = {
ANDROID_VID_DRIVER_NAME, "SDL Android video driver",
Android_Available, Android_CreateDevice
};
int
Android_VideoInit(_THIS)
{
SDL_DisplayMode mode;
/* Use a fake 32-bpp desktop mode */
mode.format = SDL_PIXELFORMAT_RGB888;
mode.w = iScreenWidth;
mode.h = iScreenHeight;
mode.refresh_rate = 0;
mode.driverdata = NULL;
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
return -1;
}
SDL_AddRenderDriver(&_this->displays[0], &Android_RenderDriver);
SDL_zero(mode);
SDL_AddDisplayMode(&_this->displays[0], &mode);
Android_InitEvents();
/* We're done! */
return 0;
}
static int
Android_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
{
return 0;
}
void
Android_VideoQuit(_THIS)
{
}
void Android_SetScreenResolution(int width, int height){
iScreenWidth = width;
iScreenHeight = height;
}
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#ifndef _SDL_androidvideo_h
#define _SDL_androidvideo_h
#include "../SDL_sysvideo.h"
#endif /* _SDL_ndsvideo_h */
/* vi: set ts=4 sw=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment