mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
Move parts of MappingCommon out of DolphinQt
Some of the functions in MappingCommon would be useful to use on mobile in the future.
This commit is contained in:
@ -34,6 +34,7 @@
|
||||
#include "InputCommon/ControlReference/ExpressionParser.h"
|
||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
#include "InputCommon/ControllerInterface/MappingCommon.h"
|
||||
|
||||
constexpr int SLIDER_TICK_COUNT = 100;
|
||||
|
||||
@ -485,9 +486,10 @@ void IOWindow::AppendSelectedOption()
|
||||
if (m_option_list->currentRow() < 0)
|
||||
return;
|
||||
|
||||
m_expression_text->insertPlainText(MappingCommon::GetExpressionForControl(
|
||||
m_option_list->item(m_option_list->currentRow(), 0)->text(), m_devq,
|
||||
m_controller->GetDefaultDevice()));
|
||||
m_expression_text->insertPlainText(
|
||||
QString::fromStdString(ciface::MappingCommon::GetExpressionForControl(
|
||||
m_option_list->item(m_option_list->currentRow(), 0)->text().toStdString(), m_devq,
|
||||
m_controller->GetDefaultDevice())));
|
||||
}
|
||||
|
||||
void IOWindow::OnDeviceChanged()
|
||||
@ -526,7 +528,7 @@ void IOWindow::OnDetectButtonPressed()
|
||||
{
|
||||
const auto expression =
|
||||
MappingCommon::DetectExpression(m_detect_button, g_controller_interface, {m_devq.ToString()},
|
||||
m_devq, MappingCommon::Quote::Off);
|
||||
m_devq, ciface::MappingCommon::Quote::Off);
|
||||
|
||||
if (expression.isEmpty())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user