Skip to content

Commit

Permalink
Formatted with clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
kitswas committed Mar 24, 2024
1 parent c9d2467 commit edb9932
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 100 deletions.
3 changes: 2 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
load_key_maps();
this->p = new Preferences(this);
ui->setupUi(this);
QPushButton::connect(ui->settingsButton, &QPushButton::pressed, this, [this] { this->p->show(); });
QPushButton::connect(ui->settingsButton, &QPushButton::pressed, this,
[this] { this->p->show(); });
QPushButton::connect(ui->startButton, &QPushButton::pressed, this, &MainWindow::launch_server);
}

Expand Down
3 changes: 2 additions & 1 deletion src/networking/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ bool inject_gamepad_state(vgp_data_exchange_gamepad_reading reading)
}

// Use the right thumbstick to move the mouse
// if (abs(reading.right_thumbstick_x) > THRESHOLD || abs(reading.right_thumbstick_y) > THRESHOLD)
// if (abs(reading.right_thumbstick_x) > THRESHOLD
// || abs(reading.right_thumbstick_y) > THRESHOLD)
int offsetX = reading.right_thumbstick_x * mouse_sensitivity;
int offsetY = reading.right_thumbstick_y * mouse_sensitivity;
int scaleX = abs(offsetX) < (THRESHOLD * mouse_sensitivity) ? 0 : 1;
Expand Down
35 changes: 21 additions & 14 deletions src/networking/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ void Server::initServer()
{
ui->IPList->addItem(tr("%1").arg(entry.toString()));
QLabel *QRWidget = new QLabel();
QRWidget->setPixmap(
QPixmap::fromImage(createQR(tr("%1:%2").arg(entry.toString()).arg(tcpServer->serverPort()))));
QRWidget->setPixmap(QPixmap::fromImage(
createQR(tr("%1:%2").arg(entry.toString()).arg(tcpServer->serverPort()))));
ui->QRViewer->addWidget(QRWidget);
}
}
Expand All @@ -104,12 +104,13 @@ void Server::initServer()
ui->IPList->setFocus(Qt::OtherFocusReason);
}
ui->statusLabel->setText(message);
connect(ui->IPList, &QListWidget::currentItemChanged, this, [this](QListWidgetItem *current, QListWidgetItem *) {
if (current != nullptr)
{
ui->QRViewer->setCurrentIndex(ui->IPList->row(current));
}
});
connect(ui->IPList, &QListWidget::currentItemChanged, this,
[this](QListWidgetItem *current, QListWidgetItem *) {
if (current != nullptr)
{
ui->QRViewer->setCurrentIndex(ui->IPList->row(current));
}
});
connect(tcpServer, &QTcpServer::newConnection, this, &Server::handleConnection);
}

Expand All @@ -120,16 +121,21 @@ void Server::handleConnection()
QString connectionMessage;
connectionMessage =
tr("Connected to %1 at `%2 : %3`")
.arg(clientConnection->peerName().isEmpty() ? "Unknown device" : clientConnection->peerName(),
clientConnection->peerAddress().toString(), QString::number(clientConnection->peerPort()));
.arg(clientConnection->peerName().isEmpty() ? "Unknown device"
: clientConnection->peerName(),
clientConnection->peerAddress().toString(),
QString::number(clientConnection->peerPort()));
qDebug() << connectionMessage;
ui->clientLabel->setText(connectionMessage);
tcpServer->pauseAccepting();
connect(clientConnection, &QAbstractSocket::disconnected, clientConnection, &QObject::deleteLater);
connect(clientConnection, &QAbstractSocket::disconnected, this, [this]() { tcpServer->resumeAccepting(); });
connect(clientConnection, &QAbstractSocket::disconnected, clientConnection,
&QObject::deleteLater);
connect(clientConnection, &QAbstractSocket::disconnected, this,
[this]() { tcpServer->resumeAccepting(); });
connect(clientConnection, &QAbstractSocket::disconnected, this,
[this]() { ui->clientLabel->setText(tr("No device connected")); });
connect(clientConnection, &QAbstractSocket::disconnected, this, [this]() { isGamepadConnected = false; });
connect(clientConnection, &QAbstractSocket::disconnected, this,
[this]() { isGamepadConnected = false; });
connect(clientConnection, &QAbstractSocket::readyRead, this, &Server::serveClient);
}

Expand All @@ -142,7 +148,8 @@ void Server::serveClient()
// vgp_data_exchange_message_unmarshal(&message, request.constData(), request.size());
// qDebug() << "Message: " << message.contents.utf8;

vgp_data_exchange_gamepad_reading gamepad_reading = parse_gamepad_state(request.constData(), request.size());
vgp_data_exchange_gamepad_reading gamepad_reading =
parse_gamepad_state(request.constData(), request.size());
qDebug() << "Reading (Btn down): " << gamepad_reading.buttons_down;
qDebug() << "Reading (Btn up): " << gamepad_reading.buttons_up;
qDebug() << "Reading (Left trigger): " << gamepad_reading.left_trigger;
Expand Down
70 changes: 43 additions & 27 deletions src/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ Preferences::Preferences(QWidget *parent) : QDialog(parent), ui(new Ui::Preferen
ui->setupUi(this);
install_event_filter();
ui->horizontalSlider->adjustSize();
ui->buttonBox->connect(ui->buttonBox, &QDialogButtonBox::accepted, this,
[this] { // running the functions to change and save the new settings if the user presses ok
this->change_mouse_sensitivity(ui->horizontalSlider->value() * 100);
qDebug() << mouse_sensitivity;
save_setting(setting_keys::Mouse_sensitivity,
mouse_sensitivity / 100); // saving the new mouse sensitivity
change_key_inputs(); // changing and saving key maps
});
ui->buttonBox->connect(ui->buttonBox, &QDialogButtonBox::rejected, this, [this] { load_keys(); });
ui->buttonBox->connect(
ui->buttonBox, &QDialogButtonBox::accepted, this,
[this] { // running the functions to change and save the new settings if the user presses ok
this->change_mouse_sensitivity(ui->horizontalSlider->value() * 100);
qDebug() << mouse_sensitivity;
save_setting(setting_keys::Mouse_sensitivity,
mouse_sensitivity / 100); // saving the new mouse sensitivity
change_key_inputs(); // changing and saving key maps
});
ui->buttonBox->connect(ui->buttonBox, &QDialogButtonBox::rejected, this,
[this] { load_keys(); });
ui->formLayout->setSizeConstraint(QLayout::SetMinimumSize);
ui->formLayout->setHorizontalSpacing(50);
ui->formLayout->setVerticalSpacing(10);
Expand Down Expand Up @@ -68,32 +70,38 @@ void Preferences::change_key_inputs()
is_mouse_button(this->temp[ui->bmap->objectName()]);
save_setting(keymaps[setting_keys::keys::B], this->temp[ui->bmap->objectName()]);
/*------------------------------------------------------------*/
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_LeftShoulder].vk = this->temp[ui->Ltmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_LeftShoulder].vk =
this->temp[ui->Ltmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_LeftShoulder].is_mouse_key =
is_mouse_button(this->temp[ui->Ltmap->objectName()]);
save_setting(keymaps[setting_keys::keys::LSHDR], this->temp[ui->Ltmap->objectName()]);
/*------------------------------------------------------------*/
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_RightShoulder].vk = this->temp[ui->Rtmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_RightShoulder].vk =
this->temp[ui->Rtmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_RightShoulder].is_mouse_key =
is_mouse_button(this->temp[ui->Rtmap->objectName()]);
save_setting(keymaps[setting_keys::keys::RSHDR], this->temp[ui->Rtmap->objectName()]);
/*------------------------------------------------------------*/
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadDown].vk = this->temp[ui->ddownmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadDown].vk =
this->temp[ui->ddownmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadDown].is_mouse_key =
is_mouse_button(this->temp[ui->ddownmap->objectName()]);
save_setting(keymaps[setting_keys::keys::DPADDOWN], this->temp[ui->ddownmap->objectName()]);
/*------------------------------------------------------------*/
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadUp].vk = this->temp[ui->dupmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadUp].vk =
this->temp[ui->dupmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadUp].is_mouse_key =
is_mouse_button(this->temp[ui->dupmap->objectName()]);
save_setting(keymaps[setting_keys::keys::DPADUP], this->temp[ui->dupmap->objectName()]);
/*------------------------------------------------------------*/
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadRight].vk = this->temp[ui->drightmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadRight].vk =
this->temp[ui->drightmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadRight].is_mouse_key =
is_mouse_button(this->temp[ui->drightmap->objectName()]);
save_setting(keymaps[setting_keys::keys::DPADRIGHT], this->temp[ui->drightmap->objectName()]);
/*------------------------------------------------------------*/
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadLeft].vk = this->temp[ui->dleftmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadLeft].vk =
this->temp[ui->dleftmap->objectName()];
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadLeft].is_mouse_key =
is_mouse_button(this->temp[ui->dleftmap->objectName()]);
save_setting(keymaps[setting_keys::keys::DPADLEFT], this->temp[ui->dleftmap->objectName()]);
Expand Down Expand Up @@ -155,27 +163,33 @@ void Preferences::load_keys()
get_scan_code(GAMEPAD_BUTTONS[GamepadButtons_B].vk, buffer, 256);
this->ui->bmap->setText(QString(buffer));
/*------------------------------------------------------------*/
this->temp[ui->Rtmap->objectName()] = GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_RightShoulder].vk;
this->temp[ui->Rtmap->objectName()] =
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_RightShoulder].vk;
get_scan_code(GAMEPAD_BUTTONS[GamepadButtons_RightShoulder].vk, buffer, 256);
this->ui->Rtmap->setText(QString(buffer));
/*------------------------------------------------------------*/
this->temp[ui->Ltmap->objectName()] = GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_LeftShoulder].vk;
this->temp[ui->Ltmap->objectName()] =
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_LeftShoulder].vk;
get_scan_code(GAMEPAD_BUTTONS[GamepadButtons_LeftShoulder].vk, buffer, 256);
this->ui->Ltmap->setText(QString(buffer));
/*------------------------------------------------------------*/
this->temp[ui->ddownmap->objectName()] = GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadDown].vk;
this->temp[ui->ddownmap->objectName()] =
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadDown].vk;
get_scan_code(GAMEPAD_BUTTONS[GamepadButtons_DPadDown].vk, buffer, 256);
this->ui->ddownmap->setText(QString(buffer));
/*------------------------------------------------------------*/
this->temp[ui->dupmap->objectName()] = GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadUp].vk;
this->temp[ui->dupmap->objectName()] =
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadUp].vk;
get_scan_code(GAMEPAD_BUTTONS[GamepadButtons_DPadUp].vk, buffer, 256);
this->ui->dupmap->setText(QString(buffer));
/*------------------------------------------------------------*/
this->temp[ui->drightmap->objectName()] = GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadRight].vk;
this->temp[ui->drightmap->objectName()] =
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadRight].vk;
get_scan_code(GAMEPAD_BUTTONS[GamepadButtons_DPadRight].vk, buffer, 256);
this->ui->drightmap->setText(QString(buffer));
/*------------------------------------------------------------*/
this->temp[ui->dleftmap->objectName()] = GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadLeft].vk;
this->temp[ui->dleftmap->objectName()] =
GAMEPAD_BUTTONS[GamepadButtons::GamepadButtons_DPadLeft].vk;
get_scan_code(GAMEPAD_BUTTONS[GamepadButtons_DPadLeft].vk, buffer, 256);
this->ui->dleftmap->setText(QString(buffer));
/*-----------------------------------------------------------*/
Expand All @@ -189,10 +203,10 @@ void Preferences::load_keys()
}

/**
* The event filter virtual function is redefined to to filter for mouse and keyboard inputs when user tries to change
* the button-key maps. Checks which object is sending the event and type of event. If event is a keyboard or
* mouse button press then map and the object is button map then get the virtual key code of the key pressed
* and store the change in a temporary variable.
* The event filter virtual function is redefined to to filter for mouse and keyboard inputs when
* user tries to change the button-key maps. Checks which object is sending the event and type of
* event. If event is a keyboard or mouse button press then map and the object is button map then
* get the virtual key code of the key pressed and store the change in a temporary variable.
* @param sender
* To get the address of the object that is triggering the event.
* @param event
Expand Down Expand Up @@ -244,7 +258,8 @@ bool Preferences::eventFilter(QObject *sender, QEvent *event)
}
else
{
if ((event->type() == QEvent::KeyPress || event->type() == QEvent::MouseButtonPress) && ptr->hasFocus())
if ((event->type() == QEvent::KeyPress || event->type() == QEvent::MouseButtonPress) &&
ptr->hasFocus())
return true;
}
}
Expand All @@ -264,7 +279,8 @@ void Preferences::keyPressEvent(QKeyEvent *e)
}

/**
* Install the above event filter on all the button maps to capture the key presses when they have the focus.
* Install the above event filter on all the button maps to capture the key presses when they have
* the focus.
*/
void Preferences::install_event_filter()
{
Expand Down
84 changes: 53 additions & 31 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
using namespace setting_keys;

const QString SETTINGS_FILE = QDir::toNativeSeparators(
QDir::homePath() + "//VirtualGamePad.ini"); // the path of the settigs file. C:\Users\<username>\VirtualGamePad.ini
QDir::homePath() + "//VirtualGamePad.ini"); // the path of the settings file.
// C:\Users\<username>\VirtualGamePad.ini
QSettings *settings;

QString setting_keys::Mouse_sensitivity = "mouse_setting/mouse_sensitivity";

void (*load_functions[])(void) = {
load_mouse_setting, load_port_number,
load_key_maps}; // an array of pointer to functions that needs to run on startup to load settings.
void (*load_functions[])(void) = {load_mouse_setting, load_port_number,
load_key_maps}; // an array of pointer to functions that needs to
// run on startup to load settings.

/**
* Save a setting to the settings file
* @param key
* The name of the setting in string format if you want to group settings seperate the head group using </>
* The name of the setting in string format if you want to group settings seperate the head group
* using </>
* @param value
* The value of the settings can be of any data type string, int, char, float, e.t.c.
*/
Expand Down Expand Up @@ -74,43 +76,63 @@ void load_key_maps() // set the key mappings to the stored values
{
GAMEPAD_BUTTONS[GamepadButtons_A] =
Input{(WORD)settings->value(keymaps[A], GAMEPAD_BUTTONS[GamepadButtons_A].vk).toULongLong(),
is_mouse_button(settings->value(keymaps[A], GAMEPAD_BUTTONS[GamepadButtons_A].vk).toULongLong())};
is_mouse_button(
settings->value(keymaps[A], GAMEPAD_BUTTONS[GamepadButtons_A].vk).toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_B] =
Input{(WORD)settings->value(keymaps[B], GAMEPAD_BUTTONS[GamepadButtons_B].vk).toULongLong(),
is_mouse_button(settings->value(keymaps[B], GAMEPAD_BUTTONS[GamepadButtons_B].vk).toULongLong())};
is_mouse_button(
settings->value(keymaps[B], GAMEPAD_BUTTONS[GamepadButtons_B].vk).toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_X] =
Input{(WORD)settings->value(keymaps[X], GAMEPAD_BUTTONS[GamepadButtons_X].vk).toULongLong(),
is_mouse_button(settings->value(keymaps[X], GAMEPAD_BUTTONS[GamepadButtons_X].vk).toULongLong())};
is_mouse_button(
settings->value(keymaps[X], GAMEPAD_BUTTONS[GamepadButtons_X].vk).toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_Y] =
Input{(WORD)settings->value(keymaps[Y], GAMEPAD_BUTTONS[GamepadButtons_Y].vk).toULongLong(),
is_mouse_button(settings->value(keymaps[Y], GAMEPAD_BUTTONS[GamepadButtons_Y].vk).toULongLong())};
is_mouse_button(
settings->value(keymaps[Y], GAMEPAD_BUTTONS[GamepadButtons_Y].vk).toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_LeftShoulder] =
Input{(WORD)settings->value(keymaps[LSHDR], GAMEPAD_BUTTONS[GamepadButtons_LeftShoulder].vk).toULongLong(),
Input{(WORD)settings->value(keymaps[LSHDR], GAMEPAD_BUTTONS[GamepadButtons_LeftShoulder].vk)
.toULongLong(),
is_mouse_button(
settings->value(keymaps[LSHDR], GAMEPAD_BUTTONS[GamepadButtons_LeftShoulder].vk).toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_RightShoulder] =
Input{(WORD)settings->value(keymaps[RSHDR], GAMEPAD_BUTTONS[GamepadButtons_RightShoulder].vk).toULongLong(),
settings->value(keymaps[LSHDR], GAMEPAD_BUTTONS[GamepadButtons_LeftShoulder].vk)
.toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_RightShoulder] = Input{
(WORD)settings->value(keymaps[RSHDR], GAMEPAD_BUTTONS[GamepadButtons_RightShoulder].vk)
.toULongLong(),
is_mouse_button(
settings->value(keymaps[RSHDR], GAMEPAD_BUTTONS[GamepadButtons_RightShoulder].vk)
.toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_DPadDown] =
Input{(WORD)settings->value(keymaps[DPADDOWN], GAMEPAD_BUTTONS[GamepadButtons_DPadDown].vk)
.toULongLong(),
is_mouse_button(
settings->value(keymaps[RSHDR], GAMEPAD_BUTTONS[GamepadButtons_RightShoulder].vk).toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_DPadDown] = Input{
(WORD)settings->value(keymaps[DPADDOWN], GAMEPAD_BUTTONS[GamepadButtons_DPadDown].vk).toULongLong(),
is_mouse_button(settings->value(keymaps[DPADDOWN], GAMEPAD_BUTTONS[GamepadButtons_DPadDown].vk).toULongLong())};
settings->value(keymaps[DPADDOWN], GAMEPAD_BUTTONS[GamepadButtons_DPadDown].vk)
.toULongLong())};
GAMEPAD_BUTTONS[GamepadButtons_DPadUp] = Input{
(WORD)settings->value(keymaps[DPADUP], GAMEPAD_BUTTONS[GamepadButtons_DPadUp].vk).toLongLong(),
is_mouse_button(settings->value(keymaps[DPADUP], GAMEPAD_BUTTONS[GamepadButtons_DPadUp].vk).toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_DPadRight] =
Input{(WORD)settings->value(keymaps[DPADRIGHT], GAMEPAD_BUTTONS[GamepadButtons_DPadRight].vk).toLongLong(),
(WORD)settings->value(keymaps[DPADUP], GAMEPAD_BUTTONS[GamepadButtons_DPadUp].vk)
.toLongLong(),
is_mouse_button(settings->value(keymaps[DPADUP], GAMEPAD_BUTTONS[GamepadButtons_DPadUp].vk)
.toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_DPadRight] = Input{
(WORD)settings->value(keymaps[DPADRIGHT], GAMEPAD_BUTTONS[GamepadButtons_DPadRight].vk)
.toLongLong(),
is_mouse_button(
settings->value(keymaps[DPADRIGHT], GAMEPAD_BUTTONS[GamepadButtons_DPadRight].vk)
.toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_DPadLeft] =
Input{(WORD)settings->value(keymaps[DPADLEFT], GAMEPAD_BUTTONS[GamepadButtons_DPadLeft].vk)
.toLongLong(),
is_mouse_button(
settings->value(keymaps[DPADRIGHT], GAMEPAD_BUTTONS[GamepadButtons_DPadRight].vk).toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_DPadLeft] = Input{
(WORD)settings->value(keymaps[DPADLEFT], GAMEPAD_BUTTONS[GamepadButtons_DPadLeft].vk).toLongLong(),
is_mouse_button(settings->value(keymaps[DPADLEFT], GAMEPAD_BUTTONS[GamepadButtons_DPadLeft].vk).toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_View] =
Input{(WORD)settings->value(keymaps[VIEW], GAMEPAD_BUTTONS[GamepadButtons_View].vk).toLongLong(),
is_mouse_button(settings->value(keymaps[VIEW], GAMEPAD_BUTTONS[GamepadButtons_View].vk).toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_Menu] =
Input{(WORD)settings->value(keymaps[MENU], GAMEPAD_BUTTONS[GamepadButtons_Menu].vk).toLongLong(),
is_mouse_button(settings->value(keymaps[MENU], GAMEPAD_BUTTONS[GamepadButtons_Menu].vk).toLongLong())};
settings->value(keymaps[DPADLEFT], GAMEPAD_BUTTONS[GamepadButtons_DPadLeft].vk)
.toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_View] = Input{
(WORD)settings->value(keymaps[VIEW], GAMEPAD_BUTTONS[GamepadButtons_View].vk).toLongLong(),
is_mouse_button(
settings->value(keymaps[VIEW], GAMEPAD_BUTTONS[GamepadButtons_View].vk).toLongLong())};
GAMEPAD_BUTTONS[GamepadButtons_Menu] = Input{
(WORD)settings->value(keymaps[MENU], GAMEPAD_BUTTONS[GamepadButtons_Menu].vk).toLongLong(),
is_mouse_button(
settings->value(keymaps[MENU], GAMEPAD_BUTTONS[GamepadButtons_Menu].vk).toLongLong())};
}

/**
Expand Down
Loading

0 comments on commit edb9932

Please sign in to comment.