mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix non-SDL build
This commit is contained in:
parent
9d80089194
commit
4b957cb66d
|
@ -237,11 +237,15 @@ void GBAKeyEditor::lookupAxes(const GBAInputMap* map) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void GBAKeyEditor::bindKey(const KeyEditor* keyEditor, GBAKey key) {
|
void GBAKeyEditor::bindKey(const KeyEditor* keyEditor, GBAKey key) {
|
||||||
|
#ifdef BUILD_SDL
|
||||||
if (keyEditor->direction() != GamepadAxisEvent::NEUTRAL) {
|
if (keyEditor->direction() != GamepadAxisEvent::NEUTRAL) {
|
||||||
m_controller->bindAxis(m_type, keyEditor->value(), keyEditor->direction(), key);
|
m_controller->bindAxis(m_type, keyEditor->value(), keyEditor->direction(), key);
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
m_controller->bindKey(m_type, keyEditor->value(), key);
|
m_controller->bindKey(m_type, keyEditor->value(), key);
|
||||||
|
#ifdef BUILD_SDL
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GBAKeyEditor::findFocus() {
|
bool GBAKeyEditor::findFocus() {
|
||||||
|
|
|
@ -19,15 +19,19 @@ extern "C" {
|
||||||
|
|
||||||
using namespace QGBA;
|
using namespace QGBA;
|
||||||
|
|
||||||
|
#ifdef BUILD_SDL
|
||||||
int InputController::s_sdlInited = 0;
|
int InputController::s_sdlInited = 0;
|
||||||
GBASDLEvents InputController::s_sdlEvents;
|
GBASDLEvents InputController::s_sdlEvents;
|
||||||
|
#endif
|
||||||
|
|
||||||
InputController::InputController(int playerId, QObject* parent)
|
InputController::InputController(int playerId, QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_playerId(playerId)
|
, m_playerId(playerId)
|
||||||
, m_config(nullptr)
|
, m_config(nullptr)
|
||||||
, m_gamepadTimer(nullptr)
|
, m_gamepadTimer(nullptr)
|
||||||
|
#ifdef BUILD_SDL
|
||||||
, m_playerAttached(false)
|
, m_playerAttached(false)
|
||||||
|
#endif
|
||||||
, m_allowOpposing(false)
|
, m_allowOpposing(false)
|
||||||
{
|
{
|
||||||
GBAInputMapInit(&m_inputMap);
|
GBAInputMapInit(&m_inputMap);
|
||||||
|
|
Loading…
Reference in New Issue