gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 869db71c758af4a40f73d671177e8a133b79ed91 parent d0522b369d92ee1178ab2cd32312697089323af5 Author: toxa <untoxa@mail.ru> Date: Fri, 16 Oct 2020 18:53:10 +0300 ability to reinit multiplayer joypads (reduce requested amount from 2 or 4 to 1) Diffstat:
| M | gbdk-lib/libc/gb/pad_ex.c | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gbdk-lib/libc/gb/pad_ex.c b/gbdk-lib/libc/gb/pad_ex.c @@ -3,7 +3,7 @@ UINT8 joypad_init(UINT8 npads, joypads_t * joypads) { UINT8 np = npads; - if ((np > 1) && (sgb_check())) { + if (sgb_check()) { switch (np) { case 2: sgb_transfer("\x89\x01"); @@ -11,7 +11,8 @@ UINT8 joypad_init(UINT8 npads, joypads_t * joypads) { case 4: sgb_transfer("\x89\x03"); break; - default: + default: + sgb_transfer("\x89\x00"); np = 1; break; }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.