mirror of
https://github.com/rodamaral/lsnes.git
synced 2025-04-02 10:42:15 -04:00
When savestating, save the controller state and restore it upon loadstate. Prevents libsnes from mixing up buttons.
18 lines
388 B
C++
Executable file
18 lines
388 B
C++
Executable file
struct Justifier : Controller {
|
|
void enter();
|
|
uint2 data();
|
|
void latch(bool data);
|
|
void serialize(serializer& s);
|
|
Justifier(bool port, bool chained);
|
|
|
|
//private:
|
|
const bool chained; //true if the second justifier is attached to the first
|
|
bool latched;
|
|
unsigned counter;
|
|
|
|
bool active;
|
|
struct Player {
|
|
signed x, y;
|
|
bool trigger, start;
|
|
} player1, player2;
|
|
};
|