SDL: SDL_WarpMouse() will move cursor coordinates for captured mouse on Android O
This commit is contained in:
@@ -1427,12 +1427,13 @@ public class MainActivity extends Activity
|
||||
}
|
||||
}
|
||||
|
||||
public void setSystemMousePointerVisible(int visible) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N)
|
||||
public void setSystemMousePointerVisible(int visible)
|
||||
{
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N)
|
||||
{
|
||||
mGLView.setPointerIcon(android.view.PointerIcon.getSystemIcon(this, (visible == 0) ? android.view.PointerIcon.TYPE_NULL : android.view.PointerIcon.TYPE_DEFAULT));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public FrameLayout getVideoLayout() { return _videoLayout; }
|
||||
|
||||
|
||||
@@ -884,6 +884,12 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
Clipboard.get().set(context, s);
|
||||
}
|
||||
|
||||
public void setCapturedMousePosition(int x, int y) // Called from native code
|
||||
{
|
||||
DifferentTouchInput.capturedMouseX = x;
|
||||
DifferentTouchInput.capturedMouseY = y;
|
||||
}
|
||||
|
||||
public void exitApp()
|
||||
{
|
||||
nativeDone();
|
||||
|
||||
Reference in New Issue
Block a user