From 4868c03480977cf0f9a368a28b33ffef5a1797d1 Mon Sep 17 00:00:00 2001 From: Detanup01 <91248446+Detanup01@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:13:10 +0100 Subject: [PATCH] fix ToggleKey --- overlay_experimental/steam_overlay.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index b588adca..2a1148dd 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -32,9 +32,10 @@ static constexpr int base_notif_window_id = 0 * max_window_id; static constexpr int base_friend_window_id = 1 * max_window_id; static constexpr int base_friend_item_id = 2 * max_window_id; -static const InGameOverlay::ToggleKey overlay_toggle_keys[] overlay_toggle_keys = { +static InGameOverlay::ToggleKey overlay_toggle_keys[] overlay_toggle_keys = { InGameOverlay::ToggleKey::SHIFT, InGameOverlay::ToggleKey::TAB }; +static const int toggle_keys_count = 2; // look for the column 'API language code' here: https://partner.steamgames.com/doc/store/localization/languages static constexpr const char* valid_languages[] = { @@ -218,7 +219,7 @@ bool Steam_Overlay::renderer_hook_proc() overlay_state_hook(state == InGameOverlay::OverlayHookState::Ready || state == InGameOverlay::OverlayHookState::Reset); }; - bool started = _renderer->StartHook(overlay_toggle_callback, overlay_toggle_keys, 2, &fonts_atlas); + bool started = _renderer->StartHook(overlay_toggle_callback, overlay_toggle_keys, toggle_keys_count, &fonts_atlas); PRINT_DEBUG("started renderer hook (result=%i)", (int)started); return true;