File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ smol_str = "0.2.0"
63
63
[dev-dependencies ]
64
64
image = { version = " 0.24.0" , default-features = false , features = [" png" ] }
65
65
simple_logger = { version = " 2.1.0" , default_features = false }
66
+
67
+ [target .'cfg(not(any(target_os = "android", target_os = "ios")))' .dev-dependencies ]
66
68
softbuffer = " 0.2.0"
67
69
68
70
[target .'cfg(target_os = "android")' .dependencies ]
Original file line number Diff line number Diff line change 7
7
//! The `softbuffer` crate is used, largely because of its ease of use. `glutin` or `wgpu` could
8
8
//! also be used to fill the window buffer, but they are more complicated to use.
9
9
10
- use softbuffer:: GraphicsContext ;
11
- use std:: cell:: RefCell ;
12
- use std:: collections:: HashMap ;
13
- use winit:: window:: { Window , WindowId } ;
10
+ use winit:: window:: Window ;
14
11
12
+ #[ cfg( not( any( target_os = "android" , target_os = "ios" ) ) ) ]
15
13
pub ( super ) fn fill_window ( window : & Window ) {
14
+ use softbuffer:: GraphicsContext ;
15
+ use std:: cell:: RefCell ;
16
+ use std:: collections:: HashMap ;
17
+ use winit:: window:: WindowId ;
18
+
16
19
thread_local ! {
17
20
/// A static, thread-local map of graphics contexts to open windows.
18
21
static GC : RefCell <HashMap <WindowId , GraphicsContext >> = RefCell :: new( HashMap :: new( ) ) ;
@@ -35,3 +38,8 @@ pub(super) fn fill_window(window: &Window) {
35
38
context. set_buffer ( & buffer, size. width as u16 , size. height as u16 ) ;
36
39
} )
37
40
}
41
+
42
+ #[ cfg( any( target_os = "android" , target_os = "ios" ) ) ]
43
+ pub ( super ) fn fill_window ( _window : & Window ) {
44
+ // No-op on mobile platforms.
45
+ }
You can’t perform that action at this time.
0 commit comments