aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r--src/crepe/facade/SDLContext.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h
index 7ccefeb..176982f 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -270,6 +270,8 @@ public:
*/
void set_color_texture(const Texture & texture, const Color & color);
+ const keyboard_state_t & get_keyboard_state() const;
+
private:
//! sdl Window
std::unique_ptr<SDL_Window, std::function<void(SDL_Window *)>> game_window;
@@ -288,7 +290,7 @@ private:
CameraAuxiliaryData cam_aux_data;
private:
- std::unordered_map<Keycode, bool> keyboard_state;
+ keyboard_state_t keyboard_state;
const std::unordered_map<SDL_Scancode, Keycode> LOOKUP_TABLE
= {{SDL_SCANCODE_SPACE, Keycode::SPACE},
{SDL_SCANCODE_APOSTROPHE, Keycode::APOSTROPHE},