From 915e52157208af9b41dd52892e7138c8c440e85b Mon Sep 17 00:00:00 2001 From: untodesu Date: Mon, 5 Jan 2026 02:20:01 +0500 Subject: Progress --- src/game/client/screenshot.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game/client/screenshot.cc') 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(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().connect<&on_glfw_key>(); + globals::dispatcher.sink().connect<&on_key>(); } void screenshot::take(void) -- cgit