mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-08 16:05:56 +00:00
Android stuff 2
This commit is contained in:
parent
798c194025
commit
5084fb82b8
4 changed files with 43 additions and 14 deletions
|
|
@ -15,7 +15,9 @@
|
|||
#ifdef HAVE_SDL3
|
||||
#include "sdl_pad_handler.h"
|
||||
#endif
|
||||
#ifndef ANDROID
|
||||
#include "keyboard_pad_handler.h"
|
||||
#endif
|
||||
#include "Emu/Io/Null/NullPadHandler.h"
|
||||
#include "Emu/Io/interception.h"
|
||||
#include "Emu/Io/PadHandler.h"
|
||||
|
|
@ -149,7 +151,9 @@ void pad_thread::Init()
|
|||
|
||||
input_log.trace("Using pad config:\n%s", g_cfg_input);
|
||||
|
||||
#ifndef ANDROID
|
||||
std::shared_ptr<keyboard_pad_handler> keyptr;
|
||||
#endif
|
||||
|
||||
// Always have a Null Pad Handler
|
||||
std::shared_ptr<NullPadHandler> nullpad = std::make_shared<NullPadHandler>();
|
||||
|
|
@ -170,16 +174,19 @@ void pad_thread::Init()
|
|||
{
|
||||
if (handler_type == pad_handler::keyboard)
|
||||
{
|
||||
#ifndef ANDROID
|
||||
keyptr = std::make_shared<keyboard_pad_handler>();
|
||||
keyptr->moveToThread(static_cast<QThread*>(m_curthread));
|
||||
keyptr->SetTargetWindow(static_cast<QWindow*>(m_curwindow));
|
||||
cur_pad_handler = keyptr;
|
||||
#else
|
||||
cur_pad_handler = nullpad;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
cur_pad_handler = GetHandler(handler_type);
|
||||
}
|
||||
|
||||
m_handlers.emplace(handler_type, cur_pad_handler);
|
||||
}
|
||||
cur_pad_handler->Init();
|
||||
|
|
@ -651,7 +658,11 @@ std::shared_ptr<PadHandlerBase> pad_thread::GetHandler(pad_handler type)
|
|||
case pad_handler::null:
|
||||
return std::make_shared<NullPadHandler>();
|
||||
case pad_handler::keyboard:
|
||||
#ifdef ANDROID
|
||||
return std::make_shared<NullPadHandler>();
|
||||
#else
|
||||
return std::make_shared<keyboard_pad_handler>();
|
||||
#endif
|
||||
case pad_handler::ds3:
|
||||
return std::make_shared<ds3_pad_handler>();
|
||||
case pad_handler::ds4:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue