Well, `__CtrlButtonDown()` doesn't care.  It just sets the current button bits, and those are sampled from the emu thread.  There's no need to clear bits already sent unless they've been released.

For example, any of the following are fine:

```
if (somekey)
   __CtrlButtonDown(CTRL_UP);
if (someotherkey)
   __CtrlButtonDown(CTRL_DOWN);

u32 pressed = 0;
if (somekey)
   pressed |= CTRL_UP;
if (someotherkey)
   pressed |= CTRL_DOWN;
__CtrlButtonDown(pressed);

if (cur.somekey && !prev.somekey)
   __CtrlButtonDown(CTRL_UP);
prev = cur;
```

The same with `__CtrlButtonUp()` and `__CtrlSetAnalog()`.  These were actually designed to be called from outside the emu thread (GE thread, dedicated input thread, whatever.)

`sceCtrl` internally manages (even if maybe there are bugs) the stage changes, there are actually 4 bitfields for newly pressed/newly released/etc.  The game can also ignore the analog stick, and has at most 64 samples worth of this data available to read.  This all happens in `__CtrlUpdateLatch()` which happens at the requested polling frequency.

Some there's really no need for anything that is updating sceCtrl, at least, to worry about or even bother to remember what it sent last time.

-[Unknown]