Skip to content

Commit 462ac75

Browse files
committed
install sdl2 in ci
1 parent a196169 commit 462ac75

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18+
- name: Install OS dependencies (sdl2), using cache
19+
uses: awalsh128/cache-apt-pkgs-action@latest
20+
with:
21+
packages: libsdl2-dev
1822
- name: Install rust
1923
run: rustup toolchain install stable --profile minimal
2024
- name: Cache Rust dependencies

src/core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl Cpu {
187187
self.mem_write_u16(0xFFFC, CPU_START as u16);
188188
}
189189

190-
pub fn load_and_run(&mut self, program: Vec<u8>) {
190+
fn load_and_run(&mut self, program: Vec<u8>) {
191191
self.load(program);
192192
self.reset();
193193
self.run();
@@ -202,7 +202,7 @@ impl Cpu {
202202
self.pc = self.mem_read_u16(0xFFFC);
203203
}
204204

205-
pub fn run(&mut self) {
205+
fn run(&mut self) {
206206
self.run_with_callback(|_| {});
207207
}
208208

0 commit comments

Comments
 (0)