~rabbits/public-inbox

uxn-playdate: Don't run controller vector when exiting the menu v1 PROPOSED

Nathan Korth: 1
 Don't run controller vector when exiting the menu

 1 files changed, 5 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~rabbits/public-inbox/patches/57236/mbox | git am -3
Learn more about email & git

[PATCH uxn-playdate] Don't run controller vector when exiting the menu Export this patch

---
 src/main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 83c787e..e1aa558 100644
--- a/src/main.c
+++ b/src/main.c
@@ -113,14 +113,17 @@ void
update_inputs(PlaydateAPI* pd) {
    PDButtons current, pushed, released;
    pd->system->getButtonState(&current, &pushed, &released);
    current &= 0x3f;
    pushed &= 0x3f;
    released &= 0x3f;

    switch (settings.ctrl_method) {
        case CTRL_CONTROLLER: {
            u8 state = 0x00;
            state |= !!(current & 0x20);
            state |= !!(current & 0x10) << 0x1;
            state |= !!(current & 0x40) << 0x2;
            state |= !!(current & 0x80) << 0x3;
            //state |= !!(current & 0x40) << 0x2;
            //state |= !!(current & 0x80) << 0x3;
            state |= !!(current & 0x04) << 0x4;
            state |= !!(current & 0x08) << 0x5;
            state |= !!(current & 0x01) << 0x6;
-- 
2.39.2 (Apple Git-143)
Thanks! That works great :)

I was just working on Oquonie for playdate, you've got excellent timing.

Dll