Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to Sciter 5 and fix bug for a newer compiler. #149

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/capi/scdef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ mod ext {
pub static mut CUSTOM_DLL_PATH: Option<String> = 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")]
Expand Down
8 changes: 5 additions & 3 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,11 @@ impl Value {
let argc = count as usize;
let mut argv: Vec<Value> = 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;
}
Expand Down