This commit is contained in:
Emile Belanger 2015-05-20 14:42:43 +01:00
parent 6418df976c
commit 0bcc0db03f
8 changed files with 1380 additions and 1371 deletions

View file

@ -17,10 +17,10 @@
An example Java class can be found in README-android.txt
-->
<application android:debuggable="true" android:label="@string/app_name"
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:allowBackup="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true">
<activity android:name="org.libsdl.app.SDLActivity"
android:screenOrientation="landscape"

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

BIN
assets/light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

BIN
assets/reload.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

@ -1 +1 @@
Subproject commit f93ba2ac968bb2bf1d82f87e78eaba77d9fe05b8
Subproject commit e3d4a112afeb0e11a8ac85a55d39067e77f42ef0

@ -1 +1 @@
Subproject commit 33130cade1af08c7ed12479f0e0ecab489851972
Subproject commit 2e584501093a9ef1d51d469e21f2444b104592a6

View file

@ -60,7 +60,7 @@ import com.beloko.touchcontrols.TouchControlsSettings;
/**
SDL Activity
*/
*/
public class SDLActivity extends Activity {
private static final String TAG = "SDL";
@ -153,6 +153,15 @@ public class SDLActivity extends Activity {
Log.v("SDL", "onCreate():" + mSingleton);
super.onCreate(savedInstanceState);
// fullscreen
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
// keep screen on
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
SDLActivity.initialize();
// So we can call stuff from static callbacks
mSingleton = this;
@ -947,7 +956,7 @@ public class SDLActivity extends Activity {
/**
Simple nativeInit() runnable
*/
*/
class SDLMain implements Runnable {
@Override
public void run() {
@ -978,9 +987,9 @@ class SDLMain implements Runnable {
in order to do anything useful.
Because of this, that's where we set up the SDL thread
*/
*/
class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
View.OnKeyListener, View.OnTouchListener, SensorEventListener {
View.OnKeyListener, View.OnTouchListener, SensorEventListener {
// Sensors
protected static SensorManager mSensorManager;