• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ossia / score / 30213925900

26 Jul 2026 06:03PM UTC coverage: 15.298% (-0.01%) from 15.311%
30213925900

push

github

jcelerier
3rdparty: bump libossia for the network-context poll fix

Brings in ossia/libossia#913: SDL joystick init no longer requires haptic
support (which the Emscripten SDL2 port does not have), and
network_context::poll() restarts the io_context, without which the
WebAssembly polling path stops after its first tick.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019oPj1zRcxSQX7FNni7EHM6

30400 of 198713 relevant lines covered (15.3%)

997.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/plugins/score-plugin-protocols/Protocols/Joystick/JoystickProtocolSettingsWidget.cpp
1

2
#include "JoystickProtocolSettingsWidget.hpp"
3

4
#include "JoystickProtocolFactory.hpp"
5
#include "JoystickSpecificSettings.hpp"
6

7
#include <State/Widgets/AddressFragmentLineEdit.hpp>
8

9
#include <score/widgets/ComboBox.hpp>
10
#include <score/widgets/HelpInteraction.hpp>
11

12
#include <ossia/protocols/joystick/joystick_protocol.hpp>
13

14
#include <QCheckBox>
15
#include <QFormLayout>
16
#include <QLabel>
17
#include <QPushButton>
18
#include <QVariant>
19

20
#include <wobjectimpl.h>
21

22
W_OBJECT_IMPL(Protocols::JoystickProtocolSettingsWidget)
×
23

24
namespace Protocols
25
{
26

27
JoystickProtocolSettingsWidget::JoystickProtocolSettingsWidget(QWidget* parent)
×
28
    : Device::ProtocolSettingsWidget(parent)
×
29
{
×
30
  m_deviceNameEdit = new State::AddressFragmentLineEdit{this};
×
31
  checkForChanges(m_deviceNameEdit);
×
32
  m_deviceNameEdit->setText("Joystick");
×
33

34
  m_gamepad = new QCheckBox{this};
×
35
  m_gamepad->setChecked(false);
×
36
  score::setHelp(
×
37
      m_gamepad, tr("Try to leverage the SDL Gamepad API. This gives access to rumble, "
×
38
                    "accelerometers, etc."));
39

40
  auto layout = new QFormLayout;
×
41
  layout->addRow(tr("Name"), m_deviceNameEdit);
×
42
  layout->addRow(tr("Gamepad API"), m_gamepad);
×
43

44
#if defined(__EMSCRIPTEN__)
45
  auto hint = new QLabel{
46
      tr("Web browsers only reveal a joystick once a button has been pressed or "
47
         "an axis moved on it. If the list of devices is empty, use the joystick "
48
         "once and it will show up."),
49
      this};
50
  hint->setWordWrap(true);
51
  layout->addRow(hint);
52
#endif
53

54
  setLayout(layout);
×
55
}
×
56

57
JoystickProtocolSettingsWidget::~JoystickProtocolSettingsWidget() { }
×
58

59
Device::DeviceSettings JoystickProtocolSettingsWidget::getSettings() const
×
60
{
61
  Device::DeviceSettings s = m_settings;
×
62
  s.name = m_deviceNameEdit->text();
×
63
  s.protocol = JoystickProtocolFactory::static_concreteKey();
×
64
  if(s.deviceSpecificSettings.canConvert<JoystickSpecificSettings>())
×
65
  {
66
    auto specif = s.deviceSpecificSettings.value<JoystickSpecificSettings>();
×
67
    specif.gamepad = m_gamepad->isChecked();
×
68
    s.deviceSpecificSettings = QVariant::fromValue(specif);
×
69
  }
×
70
  return s;
×
71
}
×
72

73
void JoystickProtocolSettingsWidget::setSettings(const Device::DeviceSettings& settings)
×
74
{
75
  m_settings = settings;
×
76
  m_deviceNameEdit->setText(settings.name);
×
77
  if(m_settings.deviceSpecificSettings.canConvert<JoystickSpecificSettings>())
×
78
  {
79
    auto specif = m_settings.deviceSpecificSettings.value<JoystickSpecificSettings>();
×
80
    m_gamepad->setChecked(specif.gamepad);
×
81
  }
×
82
}
×
83

84
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc