Browse Source

Merge pull request #72 from Meziu/fix/ci-apt-install

Fix CI by running apt-get update before install
pull/77/head
Meziu 2 years ago committed by GitHub
parent
commit
ec07231e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/ci.yml
  2. 2
      ctru-rs/src/applets/swkbd.rs
  3. 2
      ctru-rs/src/console.rs

2
.github/workflows/ci.yml

@ -39,7 +39,7 @@ jobs:
default: true default: true
- name: Install build tools for host - name: Install build tools for host
run: sudo apt-get install -y build-essential run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Install cargo-3ds - name: Install cargo-3ds
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1

2
ctru-rs/src/applets/swkbd.rs

@ -90,7 +90,7 @@ impl Swkbd {
/// (from 1-3). /// (from 1-3).
pub fn init(keyboard_type: Kind, num_buttons: i32) -> Self { pub fn init(keyboard_type: Kind, num_buttons: i32) -> Self {
unsafe { unsafe {
let mut state = Box::new(SwkbdState::default()); let mut state = Box::<SwkbdState>::default();
swkbdInit(state.as_mut(), keyboard_type as u32, num_buttons, -1); swkbdInit(state.as_mut(), keyboard_type as u32, num_buttons, -1);
Swkbd { state } Swkbd { state }
} }

2
ctru-rs/src/console.rs

@ -17,7 +17,7 @@ impl<'screen> Console<'screen> {
/// previously (including other consoles). The new console is automatically selected for /// previously (including other consoles). The new console is automatically selected for
/// printing. /// printing.
pub fn init(screen: RefMut<'screen, dyn Screen>) -> Self { pub fn init(screen: RefMut<'screen, dyn Screen>) -> Self {
let mut context = Box::new(PrintConsole::default()); let mut context = Box::<PrintConsole>::default();
unsafe { consoleInit(screen.as_raw(), context.as_mut()) }; unsafe { consoleInit(screen.as_raw(), context.as_mut()) };

Loading…
Cancel
Save