mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01:34 +11:00
rename wait for vblank functions
This commit is contained in:
parent
99f992353a
commit
476b030b41
|
@ -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.
|
/// 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
|
/// I only say almost because whilst I don't believe there to be a reason to use
|
||||||
/// this I can't rule it out.
|
/// 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 {}
|
||||||
while VCOUNT.get() < 160 {}
|
while VCOUNT.get() < 160 {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -389,7 +389,7 @@ impl VBlank {
|
||||||
VBlank {}
|
VBlank {}
|
||||||
}
|
}
|
||||||
pub fn wait_for_vblank(&self) {
|
pub fn wait_for_vblank(&self) {
|
||||||
crate::syscall::wait_for_VBlank();
|
crate::syscall::wait_for_vblank();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,15 +142,15 @@ pub extern "C" fn main() -> ! {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
fn assert_image_output(image: &str) {
|
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();
|
let mut mgba = crate::mgba::Mgba::new().unwrap();
|
||||||
mgba.print(
|
mgba.print(
|
||||||
format_args!("image:{}", image),
|
format_args!("image:{}", image),
|
||||||
crate::mgba::DebugLevel::Info,
|
crate::mgba::DebugLevel::Info,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
display::busy_wait_for_VBlank();
|
display::busy_wait_for_vblank();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -40,7 +40,7 @@ pub fn wait_for_interrupt() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn wait_for_VBlank() {
|
pub fn wait_for_vblank() {
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!(
|
asm!(
|
||||||
"swi 0x05",
|
"swi 0x05",
|
||||||
|
|
Loading…
Reference in a new issue