Moved wiimote handling into input manager.

This commit is contained in:
hiker
2018-03-20 09:42:26 +11:00
parent c456edd9f2
commit 78b120a04f
2 changed files with 9 additions and 7 deletions

View File

@@ -28,9 +28,10 @@
#include "guiengine/screen_keyboard.hpp"
#include "input/device_manager.hpp"
#include "input/gamepad_device.hpp"
#include "input/input.hpp"
#include "input/keyboard_device.hpp"
#include "input/multitouch_device.hpp"
#include "input/input.hpp"
#include "input/wiimote_manager.hpp"
#include "karts/controller/controller.hpp"
#include "karts/abstract_kart.hpp"
#include "modes/demo_world.hpp"
@@ -84,6 +85,10 @@ InputManager::InputManager() : m_mode(BOOTSTRAP),
// -----------------------------------------------------------------------------
void InputManager::update(float dt)
{
#ifdef ENABLE_WIIUSE
wiimote_manager->update();
#endif
if(m_timer_in_use)
{
m_timer -= dt;

View File

@@ -19,8 +19,6 @@
#include "main_loop.hpp"
#include <assert.h>
#include "audio/sfx_manager.hpp"
#include "config/user_config.hpp"
#include "graphics/irr_driver.hpp"
@@ -28,7 +26,6 @@
#include "guiengine/engine.hpp"
#include "guiengine/message_queue.hpp"
#include "input/input_manager.hpp"
#include "input/wiimote_manager.hpp"
#include "modes/profile_world.hpp"
#include "modes/world.hpp"
#include "network/network_config.hpp"
@@ -44,8 +41,11 @@
#include "states_screens/state_manager.hpp"
#include "utils/profiler.hpp"
#include <assert.h>
MainLoop* main_loop = 0;
// ----------------------------------------------------------------------------
MainLoop::MainLoop() :
m_abort(false)
{
@@ -323,9 +323,6 @@ void MainLoop::run()
PROFILER_POP_CPU_MARKER();
PROFILER_PUSH_CPU_MARKER("Input/GUI", 0x7F, 0x00, 0x00);
#ifdef ENABLE_WIIUSE
wiimote_manager->update();
#endif
input_manager->update(frame_duration);
GUIEngine::update(frame_duration);
PROFILER_POP_CPU_MARKER();