Emu?
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
655 B

/* SdlEvent.h
*
* An SDL2 event handler.
*/
#pragma once
#include <SDL.h>
#include "Input/PlipInput.h"
namespace PlipSdl {
enum class SdlUiEvent {
None,
Quit
};
class SdlEvent {
public:
explicit SdlEvent(Plip::PlipInput *input) : m_input(input) {};
void AddDigitalBinding(int id, SDL_Scancode scancode);
void AddDigitalBinding(int id, const std::string &binding);
SdlUiEvent ProcessEvents();
private:
void UpdateDigitalInput(SDL_Scancode scancode, bool value);
std::unordered_map<SDL_Scancode, int> m_digitalBinding;
Plip::PlipInput *m_input;
};
}