mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
use current pressed buttons when creating new controller
This commit is contained in:
parent
04e616a1bf
commit
9dedf26619
|
@ -48,9 +48,10 @@ impl Default for ButtonController {
|
||||||
|
|
||||||
impl ButtonController {
|
impl ButtonController {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
|
let pressed = !unsafe { BUTTON_INPUT.read_volatile() };
|
||||||
ButtonController {
|
ButtonController {
|
||||||
previous: 0,
|
previous: pressed,
|
||||||
current: 0,
|
current: pressed,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue