From 0d95e1910d7ea0dcccb2cc774ba189dfe5b5c8ba Mon Sep 17 00:00:00 2001 From: MicroBlock <66859419+MicroCBer@users.noreply.github.com> Date: Fri, 16 Feb 2024 08:10:32 +0000 Subject: [PATCH 1/2] update https://sciter.com/forums/topic/linux-no-libsciter-gtk-so-and-shader-compilation-error/ --- src/capi/scdef.rs | 8 ++++++++ src/lib.rs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/capi/scdef.rs b/src/capi/scdef.rs index e731416..80aff3e 100644 --- a/src/capi/scdef.rs +++ b/src/capi/scdef.rs @@ -74,6 +74,14 @@ pub enum GFX_LAYER /// Skia backend with OpenGL rendering. SKIA_OPENGL = 5, + /// vulkan + SKIA_VULKAN = 6, + #[cfg(osx)] + SKIA_METAL = 7, + #[cfg(windows)] + SKIA_DX12 = 8, + // auto + SKIA_GPU = 9, } #[repr(C)] diff --git a/src/lib.rs b/src/lib.rs index 67e5cca..f423b9c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -225,7 +225,7 @@ mod ext { pub static mut CUSTOM_DLL_PATH: Option = None; #[cfg(target_os = "linux")] - const DLL_NAMES: &[&str] = &[ "libsciter-gtk.so" ]; + const DLL_NAMES: &[&str] = &[ "libsciter.so" ]; // "libsciter.dylib" since Sciter 4.4.6.3. #[cfg(target_os = "macos")] From 518076af3956161030ee4b40516082d3e58ddb1a Mon Sep 17 00:00:00 2001 From: MicroBlock <66859419+MicroCBer@users.noreply.github.com> Date: Fri, 23 Aug 2024 19:42:22 +0800 Subject: [PATCH 2/2] Update value.rs --- src/value.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/value.rs b/src/value.rs index f83405f..162d6f3 100644 --- a/src/value.rs +++ b/src/value.rs @@ -556,9 +556,11 @@ impl Value { let argc = count as usize; let mut argv: Vec = Vec::with_capacity(argc); assert!(argc == 0 || !args.is_null()); - let args = ::std::slice::from_raw_parts(args, argc); - for arg in args { - argv.push(Value::copy_from(arg)); + if argc != 0 { + let args = ::std::slice::from_raw_parts(args, argc); + for arg in args { + argv.push(Value::copy_from(arg)); + } } return argv; }