Skip to content

Commit

Permalink
install sdl2 in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanleiby committed Dec 5, 2024
1 parent a196169 commit 462ac75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install OS dependencies (sdl2), using cache
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libsdl2-dev
- name: Install rust
run: rustup toolchain install stable --profile minimal
- name: Cache Rust dependencies
Expand Down
4 changes: 2 additions & 2 deletions src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl Cpu {
self.mem_write_u16(0xFFFC, CPU_START as u16);
}

pub fn load_and_run(&mut self, program: Vec<u8>) {
fn load_and_run(&mut self, program: Vec<u8>) {
self.load(program);
self.reset();
self.run();
Expand All @@ -202,7 +202,7 @@ impl Cpu {
self.pc = self.mem_read_u16(0xFFFC);
}

pub fn run(&mut self) {
fn run(&mut self) {
self.run_with_callback(|_| {});
}

Expand Down

0 comments on commit 462ac75

Please sign in to comment.