File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1313 - { toolchain: nightly }
1414 steps :
1515 - uses : actions/checkout@v2
16-
16+
1717 - name : Install Apt Dependencies
1818 run : sudo apt-get update && sudo apt-get install binutils-arm-none-eabi
1919
3232 toolchain : ${{ matrix.rust.toolchain }}
3333 command : build
3434 args : --examples
35+
36+ - name : Check compilation succeeds when not on the GBA (check to prevent complaints about missing things)
37+ uses : actions-rs/cargo@v1
38+ with :
39+ toolchain : ${{ matrix.rust.toolchain }}
40+ command : check
41+ args : --no-default-features
Original file line number Diff line number Diff line change 8787//! break any of these assumptions, if you do that some or all of the code
8888//! provided by this crate may become unsound.
8989
90+ #[ cfg( feature = "on_gba" ) ]
9091use prelude:: { GbaCell , IrqFn } ;
9192
9293mod macros;
@@ -118,6 +119,7 @@ pub mod video;
118119
119120/// The function pointer that the assembly runtime calls when an interrupt
120121/// occurs.
122+ #[ cfg( feature = "on_gba" ) ]
121123pub static RUST_IRQ_HANDLER : GbaCell < Option < IrqFn > > = GbaCell :: new ( None ) ;
122124
123125/// Wraps a value to be aligned to a minimum of 4.
Original file line number Diff line number Diff line change @@ -326,6 +326,7 @@ impl TextEntry {
326326}
327327
328328#[ inline]
329+ #[ cfg( feature = "on_gba" ) ]
329330pub fn video3_clear_to ( c : Color ) {
330331 let u = u32:: from ( c. 0 ) << 16 | u32:: from ( c. 0 ) ;
331332 unsafe {
@@ -350,6 +351,7 @@ impl Video3Bitmap {
350351}
351352
352353#[ inline]
354+ #[ cfg( feature = "on_gba" ) ]
353355pub fn video3_set_bitmap ( bitmap : & Video3Bitmap ) {
354356 let p = VIDEO3_VRAM . as_usize ( ) as * mut _ ;
355357 unsafe {
@@ -365,6 +367,7 @@ pub struct Video4Indexmap(pub [u8; 240 * 160]);
365367/// ## Panics
366368/// Only frames 0 and 1 exist, if `frame` is 2 or more this will panic.
367369#[ inline]
370+ #[ cfg( feature = "on_gba" ) ]
368371pub fn video4_set_indexmap ( indexes : & Video4Indexmap , frame : usize ) {
369372 let p = VIDEO4_VRAM . get_frame ( usize:: from ( frame) ) . unwrap ( ) . as_usize ( )
370373 as * mut [ u32 ; 8 ] ;
You can’t perform that action at this time.
0 commit comments