Skip to content

Commit b07717d

Browse files
authored
Merge pull request #8 from Zoxc/misc-fixes
Misc agdk-egui fixes
2 parents 19c989c + 5a7bc64 commit b07717d

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target

android-activity/src/game_activity/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::ffi::{CStr, CString};
44
use std::fs::File;
55
use std::io::{BufRead, BufReader};
66
use std::marker::PhantomData;
7-
use std::os::raw;
7+
use std::os::raw::{self, c_char};
88
use std::ptr::NonNull;
99
use std::sync::Arc;
1010
use std::sync::RwLock;
@@ -72,7 +72,7 @@ impl<'a> StateSaver<'a> {
7272
}
7373

7474
(*app_ptr).savedState = buf;
75-
(*app_ptr).savedStateSize = state.len() as u64;
75+
(*app_ptr).savedStateSize = state.len() as ffi::size_t;
7676
}
7777
}
7878
}
@@ -328,7 +328,7 @@ impl AndroidAppInner {
328328
}
329329
}
330330

331-
fn try_get_path_from_ptr(path: *const u8) -> Option<std::path::PathBuf> {
331+
fn try_get_path_from_ptr(path: *const c_char) -> Option<std::path::PathBuf> {
332332
if path == ptr::null() { return None; }
333333
let cstr = unsafe {
334334
let cstr_slice = CStr::from_ptr(path);

examples/agdk-egui/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resolver = "2"
99
[dependencies]
1010
log = "0.4"
1111
winit = "0.26"
12-
wgpu = "0.12.0"
12+
wgpu = "0.13.0"
1313
pollster = "0.2"
1414
egui = "0.18"
1515
egui-wgpu = { version = "0.18", features = [ "winit" ] }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon May 02 15:39:12 BST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

examples/agdk-egui/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn _main(event_loop: EventLoop<Event>) {
122122
&ctx.tessellate(full_output.shapes),
123123
&full_output.textures_delta);
124124

125-
if full_output.needs_repaint {
125+
if full_output.repaint_after.is_zero() {
126126
window.request_redraw();
127127
}
128128
}

0 commit comments

Comments
 (0)