Updated SDL
This commit is contained in:
parent
6feebe351d
commit
d1c105cd46
10 changed files with 42 additions and 20 deletions
|
|
@ -25,6 +25,18 @@ public class InfiniPaintSurface extends SDLSurface {
|
|||
WindowInsets.Type.displayCutout());
|
||||
|
||||
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom);
|
||||
|
||||
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||
if (!mKeyboardVisible) {
|
||||
mKeyboardVisible = true;
|
||||
SDLActivity.onNativeScreenKeyboardShown();
|
||||
}
|
||||
} else {
|
||||
if (mKeyboardVisible) {
|
||||
mKeyboardVisible = false;
|
||||
SDLActivity.onNativeScreenKeyboardHidden();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pass these to any child views in case they need them
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
private static final String TAG = "SDL";
|
||||
private static final int SDL_MAJOR_VERSION = 3;
|
||||
private static final int SDL_MINOR_VERSION = 4;
|
||||
private static final int SDL_MICRO_VERSION = 4;
|
||||
private static final int SDL_MICRO_VERSION = 8;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
|
|
@ -570,7 +570,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static int getNaturalOrientation() {
|
||||
int result = SDL_ORIENTATION_UNKNOWN;
|
||||
|
||||
Activity activity = (Activity)getContext();
|
||||
Activity activity = getContext();
|
||||
if (activity != null) {
|
||||
Configuration config = activity.getResources().getConfiguration();
|
||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||
|
|
@ -590,7 +590,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static int getCurrentRotation() {
|
||||
int result = 0;
|
||||
|
||||
Activity activity = (Activity)getContext();
|
||||
Activity activity = getContext();
|
||||
if (activity != null) {
|
||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||
switch (display.getRotation()) {
|
||||
|
|
@ -1292,7 +1292,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static double getDiagonal()
|
||||
{
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
Activity activity = (Activity)getContext();
|
||||
Activity activity = getContext();
|
||||
if (activity == null) {
|
||||
return 0.0;
|
||||
}
|
||||
|
|
@ -1940,7 +1940,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
return;
|
||||
}
|
||||
|
||||
Activity activity = (Activity)getContext();
|
||||
Activity activity = getContext();
|
||||
if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
|
||||
activity.requestPermissions(new String[]{permission}, requestCode);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
// Is SurfaceView ready for rendering
|
||||
protected boolean mIsSurfaceReady;
|
||||
|
||||
// Is on-screen keyboard visible
|
||||
protected boolean mKeyboardVisible;
|
||||
|
||||
// Pinch events
|
||||
private final ScaleGestureDetector scaleGestureDetector;
|
||||
|
||||
|
|
@ -208,6 +211,18 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
WindowInsets.Type.displayCutout());
|
||||
|
||||
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom);
|
||||
|
||||
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||
if (!mKeyboardVisible) {
|
||||
mKeyboardVisible = true;
|
||||
SDLActivity.onNativeScreenKeyboardShown();
|
||||
}
|
||||
} else {
|
||||
if (mKeyboardVisible) {
|
||||
mKeyboardVisible = false;
|
||||
SDLActivity.onNativeScreenKeyboardHidden();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pass these to any child views in case they need them
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
conan export %0/../conan-skia/recipes/skia/all/conanfile.py --version=143.20251028.0
|
||||
conan export %0/../icu/all/conanfile.py --version=77.1
|
||||
conan export %0/../sdl/3.x/conanfile.py --version=3.4.4
|
||||
conan export %0/../sdl/3.x/conanfile.py --version=3.4.8
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||
|
||||
conan export "$(dirname "$0")/conan-skia/recipes/skia/all/conanfile.py" --version=143.20251028.0
|
||||
conan export "$(dirname "$0")/icu/all/conanfile.py" --version=77.1
|
||||
conan export "$(dirname "$0")/sdl/3.x/conanfile.py" --version=3.4.4
|
||||
conan export "$(dirname "$0")/sdl/3.x/conanfile.py" --version=3.4.8
|
||||
#conan create . -o use_system_expat=False -o use_system_freetype=False -o use_system_harfbuzz=False -o use_system_icu=False -o use_system_libjpeg_turbo=False -o use_system_libpng=False -o use_system_libwebp=False -o use_system_zlib=False --build=missing --version=134.20250327.0
|
||||
#cd ../../../..
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
sources:
|
||||
"3.4.4":
|
||||
url: "https://github.com/libsdl-org/SDL/releases/download/release-3.4.4/SDL3-3.4.4.tar.gz"
|
||||
sha256: "ee712dbe6a89bb140bbfc2ce72358fb5ee5cc2240abeabd54855012db30b3864"
|
||||
"3.4.8":
|
||||
url: "https://github.com/libsdl-org/SDL/releases/download/release-3.4.8/SDL3-3.4.8.tar.gz"
|
||||
sha256: "e9fff7467fb60f037e6708da18b25560649e4c63edc2a69bb871b960d9cbfbba"
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class CompressorRecipe(ConanFile):
|
|||
if self.settings.os == "Linux":
|
||||
self.requires("fontconfig/2.17.1")
|
||||
self.requires("egl/system")
|
||||
self.requires("sdl-infinipaint/3.4.4", options = {
|
||||
self.requires("sdl-infinipaint/3.4.8", options = {
|
||||
"wayland": False,
|
||||
"x11": True,
|
||||
"pulseaudio": False,
|
||||
|
|
@ -102,11 +102,11 @@ class CompressorRecipe(ConanFile):
|
|||
"opengles": False
|
||||
})
|
||||
elif self.settings.os == "Emscripten":
|
||||
self.requires("sdl-infinipaint/3.4.4", options = {
|
||||
self.requires("sdl-infinipaint/3.4.8", options = {
|
||||
"emscriptenPersistentPath": "/infinipaint"
|
||||
})
|
||||
elif self.settings.os != "Android":
|
||||
self.requires("sdl-infinipaint/3.4.4")
|
||||
self.requires("sdl-infinipaint/3.4.8")
|
||||
|
||||
if self.settings.os != "Emscripten" and self.settings.os != "Macos" and self.settings.os != "Android":
|
||||
self.requires("hwloc/2.12.2", options = {
|
||||
|
|
|
|||
2
deps/SDL
vendored
2
deps/SDL
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 5848e584a1b606de26e3dbd1c7e4ecbc34f807a6
|
||||
Subproject commit d9d5536704d585616d4db3c8ba3c4ff6fc2757e1
|
||||
|
|
@ -83,6 +83,7 @@ void EyeDropperTool::input_mouse_button_on_canvas_callback(const InputManager::M
|
|||
toolConfig.globalConf.foregroundColor = readData.cast<float>() / 255.0f;
|
||||
else
|
||||
toolConfig.globalConf.backgroundColor = readData.cast<float>() / 255.0f;
|
||||
drawP.world.main.g.gui.set_to_layout();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,12 +16,6 @@ GUIHolder::GUIHolder(MainProgram& m):
|
|||
// So, it's better to load the icons at the beginning of the program so that the icon loading doesn't fail later
|
||||
load_icons_at("data/icons");
|
||||
|
||||
|
||||
// Recursive search still not fixed on Android SDL
|
||||
#ifdef __ANDROID__
|
||||
load_icons_at("data/icons/RemixIcon");
|
||||
#endif
|
||||
|
||||
load_default_theme();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue