1
0
Fork 0
mirror of https://github.com/PabloMK7/citra.git synced 2025-06-24 01:29:05 +00:00
citra/src/input_common/sdl/sdl.h
James Rowe 6bcbda5ab2 Input: UDP Client to provide motion and touch controls
An implementation of the cemuhook motion/touch protocol, this adds the
ability for users to connect several different devices to citra to send
direct motion and touch data to citra.
2018-08-07 21:05:09 -06:00

42 lines
1.1 KiB
C++

// Copyright 2017 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include <vector>
#include "core/frontend/input.h"
union SDL_Event;
namespace Common {
class ParamPackage;
}
namespace InputCommon {
namespace Polling {
class DevicePoller;
enum class DeviceType;
} // namespace Polling
} // namespace InputCommon
namespace InputCommon {
namespace SDL {
/// Initializes and registers SDL device factories
void Init();
/// Unresisters SDL device factories and shut them down.
void Shutdown();
/// Creates a ParamPackage from an SDL_Event that can directly be used to create a ButtonDevice
Common::ParamPackage SDLEventToButtonParamPackage(const SDL_Event& event);
namespace Polling {
/// Get all DevicePoller that use the SDL backend for a specific device type
void GetPollers(InputCommon::Polling::DeviceType type,
std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>>& pollers);
} // namespace Polling
} // namespace SDL
} // namespace InputCommon