Update to v106r26 release.

byuu says:

Changelog:

  - nall: added -static-libgcc -static-libstdc++ to Windows/GCC link
    flags
  - bsnes, higan: added program icons to main window when game isn't
    loaded
  - bsnes: improved recent games menu sorting
  - bsnes: fixed multi-game recent game loading on Windows
  - bsnes: completed path override support
  - bsnes, higan: added screensaver suppression on Windows
  - icarus: add 32K volatile RAM to SuperFX boards that report no RAM
    (fixes Starfox)
  - bsnes, higan: added automatic dependency generation [Talarubi]
  - hiro/GTK: appending actions to menus restores enabled() state
  - higan: use board node inside manifest.bml if it exists
  - bsnes: added blur emulation and color emulation options to view menu
  - ruby: upgraded input.sdl to SDL 2.0 (though it makes no functional
    difference sadly)
  - ruby: removed video.sdl (due to deprecating SDL 1.2)
  - nall, ruby: improvements to HID class (generic vendor and product
    IDs)

Errata:

  - bsnes, higan: on Windows, Application::Windows::onScreenSaver needs
    `[&]` lambda capture, not `[]`
      - find it in presentation/presentation.cpp
This commit is contained in:
Tim Allen
2018-05-24 12:14:17 +10:00
parent 3353efd3a1
commit 5961ea9c03
80 changed files with 745 additions and 519 deletions

View File

@@ -1,3 +1,5 @@
#pragma once
struct InputKeyboardCarbon {
Input& input;
InputKeyboardCarbon(Input& input) : input(input) {}
@@ -145,7 +147,9 @@ struct InputKeyboardCarbon {
keys.append({0x3a, "Alt"});
keys.append({0x37, "Super"});
hid->setID(1);
hid->setVendorID(HID::Keyboard::GenericVendorID);
hid->setProductID(HID::Keyboard::GenericProductID);
hid->setPathID(0);
for(auto& key : keys) {
hid->buttons().append(key.name);
}

View File

@@ -1,3 +1,5 @@
#pragma once
struct InputKeyboardQuartz {
Input& input;
InputKeyboardQuartz(Input& input) : input(input) {}
@@ -140,7 +142,9 @@ struct InputKeyboardQuartz {
keys.append({"Option", kVK_Option});
keys.append({"Command", kVK_Command});
hid->setID(1);
hid->setVendorID(HID::Keyboard::GenericVendorID);
hid->setProductID(HID::Keyboard::GenericProductID);
hid->setPath(0);
for(auto& key : keys) {
hid->buttons().append(key.name);
}

View File

@@ -1,5 +1,4 @@
#ifndef RUBY_INPUT_KEYBOARD_RAWINPUT
#define RUBY_INPUT_KEYBOARD_RAWINPUT
#pragma once
struct InputKeyboardRawInput {
Input& input;
@@ -18,8 +17,8 @@ struct InputKeyboardRawInput {
} kb;
auto update(RAWINPUT* input) -> void {
unsigned code = input->data.keyboard.MakeCode;
unsigned flag = input->data.keyboard.Flags;
uint code = input->data.keyboard.MakeCode;
uint flag = input->data.keyboard.Flags;
for(auto& key : keys) {
if(key.code != code) continue;
@@ -27,7 +26,7 @@ struct InputKeyboardRawInput {
}
}
auto assign(unsigned inputID, bool value) -> void {
auto assign(uint inputID, bool value) -> void {
auto& group = kb.hid->buttons();
if(group.input(inputID).value() == value) return;
input.doChange(kb.hid, HID::Keyboard::GroupID::Button, inputID, group.input(inputID).value(), value);
@@ -35,7 +34,7 @@ struct InputKeyboardRawInput {
}
auto poll(vector<shared_pointer<HID::Device>>& devices) -> void {
for(unsigned n = 0; n < keys.size(); n++) assign(n, keys[n].value);
for(auto n : range(keys)) assign(n, keys[n].value);
devices.append(kb.hid);
}
@@ -164,7 +163,9 @@ struct InputKeyboardRawInput {
keys.append({0x005c, 2, "RightSuper"});
keys.append({0x005d, 2, "Menu"});
kb.hid->setID(1);
kb.hid->setVendorID(HID::Keyboard::GenericVendorID);
kb.hid->setProductID(HID::Keyboard::GenericProductID);
kb.hid->setPathID(0);
for(auto& key : keys) kb.hid->buttons().append(key.name);
return true;
@@ -174,5 +175,3 @@ struct InputKeyboardRawInput {
rawinput.updateKeyboard.reset();
}
};
#endif

View File

@@ -1,5 +1,4 @@
#ifndef RUBY_INPUT_KEYBOARD_XLIB
#define RUBY_INPUT_KEYBOARD_XLIB
#pragma once
struct InputKeyboardXlib {
Input& input;
@@ -153,7 +152,9 @@ struct InputKeyboardXlib {
keys.append({"RightSuper", XK_Super_R});
keys.append({"Menu", XK_Menu});
hid->setID(1);
hid->setVendorID(HID::Keyboard::GenericVendorID);
hid->setProductID(HID::Keyboard::GenericProductID);
hid->setPathID(0);
for(auto& key : keys) {
hid->buttons().append(key.name);
@@ -170,5 +171,3 @@ struct InputKeyboardXlib {
}
}
};
#endif