Update to v094r25 release.

byuu says:

Windows port should run mostly well now, although exiting fullscreen
breaks the application in a really bizarre way. (clicking on the window
makes it sink to background rather than come to the foreground o_O)

I also need to add the doModalChange => audio.clear() thing for the
accursed menu stuttering with DirectSound.

I also finished porting all of the ruby drivers over to the newer API
changes from nall.

Since I can't compile the Linux or OS X drivers, I have no idea if there
are any typos that will result in compilation errors. If so, please let
me know where they're at and I'll try and fix them. If they're simple,
please try and fix them on your end to test further if you can.

I'm hopeful the udev crash will be gone now that nall::string checks for
null char* values passed to its stringify function. Of course, it's
a problem it's getting a null value in the first place, so it may not
work at all.

If you can compile on Linux (or by some miracle, OS X), please test each
video/audio/input driver if you don't mind, to make sure there's no
"compiles okay but still typos exist" bugs.
This commit is contained in:
Tim Allen
2015-06-16 08:16:43 +10:00
parent f0c17ffc0d
commit bb3c69a30d
75 changed files with 1017 additions and 906 deletions

View File

@@ -23,7 +23,7 @@ struct pInputUdev {
uintptr_t handle = 0;
} settings;
bool cap(const string& name) {
auto cap(const string& name) -> bool {
if(name == Input::Handle) return true;
if(name == Input::KeyboardSupport) return true;
if(name == Input::MouseSupport) return true;
@@ -32,51 +32,51 @@ struct pInputUdev {
return false;
}
any get(const string& name) {
if(name == Input::Handle) return (uintptr_t)settings.handle;
return false;
auto get(const string& name) -> any {
if(name == Input::Handle) return settings.handle;
return {};
}
bool set(const string& name, const any& value) {
if(name == Input::Handle) {
settings.handle = any_cast<uintptr_t>(value);
auto set(const string& name, const any& value) -> bool {
if(name == Input::Handle && value.is<uintptr_t>()) {
settings.handle = value.get<uintptr_t>();
return true;
}
return false;
}
bool acquire() {
auto acquire() -> bool {
return xlibMouse.acquire();
}
bool unacquire() {
auto unacquire() -> bool {
return xlibMouse.unacquire();
}
bool acquired() {
auto acquired() -> bool {
return xlibMouse.acquired();
}
vector<HID::Device*> poll() {
vector<HID::Device*> devices;
auto poll() -> vector<shared_pointer<HID::Device>> {
vector<shared_pointer<HID::Device>> devices;
xlibKeyboard.poll(devices);
xlibMouse.poll(devices);
udev.poll(devices);
return devices;
}
bool rumble(uint64_t id, bool enable) {
auto rumble(uint64_t id, bool enable) -> bool {
return udev.rumble(id, enable);
}
bool init() {
auto init() -> bool {
if(xlibKeyboard.init() == false) return false;
if(xlibMouse.init(settings.handle) == false) return false;
if(udev.init() == false) return false;
return true;
}
void term() {
auto term() -> void {
xlibKeyboard.term();
xlibMouse.term();
udev.term();