rename wait for vblank functions

This commit is contained in:
Corwin Kuiper 2021-08-06 23:28:19 +01:00
parent 99f992353a
commit 476b030b41
4 changed files with 6 additions and 6 deletions

View file

@ -104,7 +104,7 @@ unsafe fn set_graphics_settings(settings: GraphicsSettings) {
/// Waits until vblank using a busy wait loop, this should almost never be used.
/// I only say almost because whilst I don't believe there to be a reason to use
/// this I can't rule it out.
pub fn busy_wait_for_VBlank() {
pub fn busy_wait_for_vblank() {
while VCOUNT.get() >= 160 {}
while VCOUNT.get() < 160 {}
}

View file

@ -389,7 +389,7 @@ impl VBlank {
VBlank {}
}
pub fn wait_for_vblank(&self) {
crate::syscall::wait_for_VBlank();
crate::syscall::wait_for_vblank();
}
}

View file

@ -142,15 +142,15 @@ pub extern "C" fn main() -> ! {
#[cfg(test)]
fn assert_image_output(image: &str) {
display::busy_wait_for_VBlank();
display::busy_wait_for_VBlank();
display::busy_wait_for_vblank();
display::busy_wait_for_vblank();
let mut mgba = crate::mgba::Mgba::new().unwrap();
mgba.print(
format_args!("image:{}", image),
crate::mgba::DebugLevel::Info,
)
.unwrap();
display::busy_wait_for_VBlank();
display::busy_wait_for_vblank();
}
#[cfg(test)]

View file

@ -40,7 +40,7 @@ pub fn wait_for_interrupt() {
}
#[allow(non_snake_case)]
pub fn wait_for_VBlank() {
pub fn wait_for_vblank() {
unsafe {
asm!(
"swi 0x05",