XSDL: support for x11://localhost:6000 intent to launch X server

This commit is contained in:
pelya
2015-01-02 00:38:56 +02:00
parent fa1dac3650
commit fdcee4b65c
7 changed files with 40 additions and 2 deletions

View File

@@ -0,0 +1 @@
../xserver/java.patch

View File

@@ -0,0 +1 @@
../xserver/project.patch

View File

@@ -0,0 +1 @@
../xserver/java.patch

View File

@@ -0,0 +1 @@
../xserver/project.patch

View File

@@ -0,0 +1,21 @@
diff --git a/project/java/Video.java b/project/java/Video.java
index eb25252..a327c6b 100644
--- a/project/java/Video.java
+++ b/project/java/Video.java
@@ -691,6 +691,16 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
if(Globals.AudioBufferConfig >= 2)
Thread.currentThread().setPriority( (Thread.NORM_PRIORITY + Thread.MIN_PRIORITY) / 2 ); // Lower than normal
// Calls main() and never returns, hehe - we'll call eglSwapBuffers() from native code
+ if (context.getIntent().getScheme() != null && context.getIntent().getScheme().equals("x11"))
+ {
+ int port = context.getIntent().getData().getPort();
+ if (port >= 0)
+ {
+ if (port >= 6000)
+ port -= 6000;
+ Globals.CommandLine = Globals.CommandLine + " :" + port;
+ }
+ }
nativeInit( Globals.DataDir,
Globals.CommandLine,
( (Globals.SwVideoMode && Globals.MultiThreadedVideo) || Globals.CompatibilityHacksVideo ) ? 1 : 0,

View File

@@ -0,0 +1,15 @@
--- a/project/AndroidManifest.xml 2015-01-01 23:59:34.805231773 +0200
+++ a/project/AndroidManifest.xml 2015-01-01 23:59:45.189378809 +0200
@@ -23,6 +23,12 @@
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" /> <!-- Samsung's multiwindow -->
<action android:name="com.sec.android.airview.HOVER" /> <!-- Stupid Samsung requires their own intent for finger-hover events -->
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <action android:name="android.content.Intent.ACTION_VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="x11" />
+ </intent-filter>
</activity>
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" /> <!-- Samsung's multiwindow -->
<activity android:name=".RestartMainActivity"

View File

@@ -29,8 +29,6 @@ TODO, which will get actually done
- SDL: control mouse with right analog gamepad stick.
- XSDL: support Android intent x11://localhost:6000 - http://www.openintents.org/node/905
- USB Keyboard: configurable mouse speed, show keyboard LEDs, redefine unknown keys, fix Lollipop SELinux bug.
- S Planner Killer: options to restore calendar settiongs, and to kill lock-screen widget.