mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-10-06 08:41:33 +02:00
Update to v094r21 release.
byuu says: This updates ruby to return shared_pointer<HID::Device> objects instead of HID::Device* objects. It also fixes an ID bug where joypads were starting at ID# 2+, but mice were also set to ID# 2. I also revised nall/hid a lot, with getters and setters instead of stabbing at internal state. I didn't yet patch nall::string to safely consume nullptr const char* values, though.
This commit is contained in:
@@ -130,21 +130,21 @@ using namespace nall;
|
||||
|
||||
#define DeclareInput(Name) \
|
||||
struct Input##Name : Input { \
|
||||
bool cap(const string& name) { return p.cap(name); } \
|
||||
any get(const string& name) { return p.get(name); } \
|
||||
bool set(const string& name, const any& value) { return p.set(name, value); } \
|
||||
\
|
||||
bool acquire() { return p.acquire(); } \
|
||||
bool unacquire() { return p.unacquire(); } \
|
||||
bool acquired() { return p.acquired(); } \
|
||||
\
|
||||
vector<HID::Device*> poll() { return p.poll(); } \
|
||||
bool rumble(uint64_t id, bool enable) { return p.rumble(id, enable); } \
|
||||
bool init() { return p.init(); } \
|
||||
void term() { p.term(); } \
|
||||
\
|
||||
Input##Name() : p(*new pInput##Name) {} \
|
||||
~Input##Name() { delete &p; } \
|
||||
\
|
||||
auto cap(const string& name) -> bool { return p.cap(name); } \
|
||||
auto get(const string& name) -> any { return p.get(name); } \
|
||||
auto set(const string& name, const any& value) -> bool { return p.set(name, value); } \
|
||||
\
|
||||
auto acquire() -> bool { return p.acquire(); } \
|
||||
auto unacquire() -> bool { return p.unacquire(); } \
|
||||
auto acquired() -> bool { return p.acquired(); } \
|
||||
\
|
||||
auto poll() -> vector<shared_pointer<HID::Device>> { return p.poll(); } \
|
||||
auto rumble(uint64_t id, bool enable) -> bool { return p.rumble(id, enable); } \
|
||||
auto init() -> bool { return p.init(); } \
|
||||
auto term() -> void { p.term(); } \
|
||||
\
|
||||
private: \
|
||||
pInput##Name& p; \
|
||||
|
Reference in New Issue
Block a user