renamed DefaultMessageProcessor to UInputMessageProcessor
This commit is contained in:
parent
c0891ef16d
commit
549dbe4674
4 changed files with 15 additions and 15 deletions
|
@ -16,12 +16,12 @@
|
|||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "default_message_processor.hpp"
|
||||
#include "uinput_message_processor.hpp"
|
||||
|
||||
#include "log.hpp"
|
||||
#include "uinput.hpp"
|
||||
|
||||
DefaultMessageProcessor::DefaultMessageProcessor(UInput& uinput,
|
||||
UInputMessageProcessor::UInputMessageProcessor(UInput& uinput,
|
||||
ControllerSlotConfigPtr config,
|
||||
const Options& opts) :
|
||||
m_uinput(uinput),
|
||||
|
@ -34,12 +34,12 @@ DefaultMessageProcessor::DefaultMessageProcessor(UInput& uinput,
|
|||
memset(&m_oldmsg, 0, sizeof(m_oldmsg));
|
||||
}
|
||||
|
||||
DefaultMessageProcessor::~DefaultMessageProcessor()
|
||||
UInputMessageProcessor::~UInputMessageProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
DefaultMessageProcessor::send(const XboxGenericMsg& msg_in, int msec_delta)
|
||||
UInputMessageProcessor::send(const XboxGenericMsg& msg_in, int msec_delta)
|
||||
{
|
||||
if (!m_config->empty())
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ DefaultMessageProcessor::send(const XboxGenericMsg& msg_in, int msec_delta)
|
|||
}
|
||||
|
||||
void
|
||||
DefaultMessageProcessor::set_rumble(uint8_t lhs, uint8_t rhs)
|
||||
UInputMessageProcessor::set_rumble(uint8_t lhs, uint8_t rhs)
|
||||
{
|
||||
if (m_rumble_callback)
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ DefaultMessageProcessor::set_rumble(uint8_t lhs, uint8_t rhs)
|
|||
}
|
||||
|
||||
void
|
||||
DefaultMessageProcessor::set_ff_callback(const boost::function<void (uint8_t, uint8_t)>& callback)
|
||||
UInputMessageProcessor::set_ff_callback(const boost::function<void (uint8_t, uint8_t)>& callback)
|
||||
{
|
||||
m_config->set_ff_callback(callback);
|
||||
}
|
|
@ -26,7 +26,7 @@ class UInput;
|
|||
class Options;
|
||||
class ControllerOptions;
|
||||
|
||||
class DefaultMessageProcessor : public MessageProcessor
|
||||
class UInputMessageProcessor : public MessageProcessor
|
||||
{
|
||||
private:
|
||||
UInput& m_uinput;
|
||||
|
@ -39,17 +39,17 @@ private:
|
|||
boost::function<void (uint8_t, uint8_t)> m_rumble_callback;
|
||||
|
||||
public:
|
||||
DefaultMessageProcessor(UInput& uinput, ControllerSlotConfigPtr config,
|
||||
UInputMessageProcessor(UInput& uinput, ControllerSlotConfigPtr config,
|
||||
const Options& opts);
|
||||
~DefaultMessageProcessor();
|
||||
~UInputMessageProcessor();
|
||||
|
||||
void send(const XboxGenericMsg& msg, int msec_delta);
|
||||
void set_rumble(uint8_t lhs, uint8_t rhs);
|
||||
void set_ff_callback(const boost::function<void (uint8_t, uint8_t)>& callback);
|
||||
|
||||
private:
|
||||
DefaultMessageProcessor(const DefaultMessageProcessor&);
|
||||
DefaultMessageProcessor& operator=(const DefaultMessageProcessor&);
|
||||
UInputMessageProcessor(const UInputMessageProcessor&);
|
||||
UInputMessageProcessor& operator=(const UInputMessageProcessor&);
|
||||
};
|
||||
|
||||
#endif
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "command_line_options.hpp"
|
||||
#include "dummy_message_processor.hpp"
|
||||
#include "default_message_processor.hpp"
|
||||
#include "uinput_message_processor.hpp"
|
||||
#include "evdev_controller.hpp"
|
||||
#include "helper.hpp"
|
||||
#include "raise_exception.hpp"
|
||||
|
@ -468,7 +468,7 @@ Xboxdrv::run_main(const Options& opts)
|
|||
// the device creation
|
||||
uinput->finish();
|
||||
|
||||
message_proc.reset(new DefaultMessageProcessor(*uinput, config_set, opts));
|
||||
message_proc.reset(new UInputMessageProcessor(*uinput, config_set, opts));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "default_message_processor.hpp"
|
||||
#include "uinput_message_processor.hpp"
|
||||
#include "dummy_message_processor.hpp"
|
||||
#include "helper.hpp"
|
||||
#include "log.hpp"
|
||||
|
@ -484,7 +484,7 @@ XboxdrvDaemon::launch_xboxdrv(const XPadDevice& dev_type, const Options& opts,
|
|||
std::auto_ptr<MessageProcessor> message_proc;
|
||||
if (m_uinput.get())
|
||||
{
|
||||
message_proc.reset(new DefaultMessageProcessor(*m_uinput, slot.config, opts));
|
||||
message_proc.reset(new UInputMessageProcessor(*m_uinput, slot.config, opts));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue