You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
implement some stuff to make exaple SDL app run
NOTE: the main addition in this commit is WIP support for apps which render on an EGL surface obtained using ANativeWindow_fromSurface currently, this EGL surface is obtained by creating a 700x700 pixel window with GLFW (the 700x700 size is hardcoded in several places) and only Wayland is supported ideally, we'd want to use a wayland subsurface to position the EGL surface above the Surface widget it's associated with (and do whatever for X11)
This commit is contained in:
@@ -21,6 +21,7 @@ import java.io.StringReader;
|
||||
public class Activity extends Context {
|
||||
LayoutInflater layout_inflater;
|
||||
Window window = new Window();
|
||||
int requested_orientation = -1 /*ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED*/; // dummy
|
||||
|
||||
protected void set_window(long native_window) {
|
||||
window.native_window = native_window;
|
||||
@@ -49,6 +50,14 @@ public class Activity extends Context {
|
||||
// return new Intent();
|
||||
}
|
||||
|
||||
public int getRequestedOrientation() {
|
||||
return requested_orientation;
|
||||
}
|
||||
|
||||
public void setRequestedOrientation (int orientation) {
|
||||
requested_orientation = orientation;
|
||||
}
|
||||
|
||||
public boolean isFinishing() {
|
||||
return false; // FIXME
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user