diff options
| author | untodesu <kirill@untode.su> | 2026-01-05 02:20:01 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2026-01-05 02:20:01 +0500 |
| commit | 915e52157208af9b41dd52892e7138c8c440e85b (patch) | |
| tree | 718224dbf69a1fdf557131a648c34e60dbdca25d /src/game/client/screenshot.cc | |
| parent | a1c83d56f41e6f2e0ad86dcd76d1446bfc60a37c (diff) | |
| download | voxelius-915e52157208af9b41dd52892e7138c8c440e85b.tar.bz2 voxelius-915e52157208af9b41dd52892e7138c8c440e85b.zip | |
Progress
Diffstat (limited to 'src/game/client/screenshot.cc')
| -rw-r--r-- | src/game/client/screenshot.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/client/screenshot.cc b/src/game/client/screenshot.cc index a4c043e..868a8bb 100644 --- a/src/game/client/screenshot.cc +++ b/src/game/client/screenshot.cc @@ -17,7 +17,7 @@ #include "client/gui/language.hh" #include "client/gui/settings.hh" -#include "client/io/glfw.hh" +#include "client/io/keyboard.hh" #include "client/globals.hh" #include "client/toggles.hh" @@ -29,10 +29,10 @@ static void stbi_png_physfs_callback(void* context, void* data, int size) PHYSFS_writeBytes(reinterpret_cast<PHYSFS_File*>(context), data, size); } -static void on_glfw_key(const GlfwKeyEvent& event) +static void on_key(const KeyEvent& event) { if(!globals::gui_keybind_ptr && !toggles::is_sequence_await) { - if(screenshot_key.equals(event.key) && (event.action == GLFW_PRESS)) { + if(event.is_keycode(screenshot_key.get_key()) && event.is_action(GLFW_PRESS)) { screenshot::take(); return; } @@ -45,7 +45,7 @@ void screenshot::init(void) settings::add_keybind(0, screenshot_key, settings_location::KEYBOARD_MISC, "key.screenshot"); - globals::dispatcher.sink<GlfwKeyEvent>().connect<&on_glfw_key>(); + globals::dispatcher.sink<KeyEvent>().connect<&on_key>(); } void screenshot::take(void) |
