From 7ddc2078577bba99a584e749d1bfd93e64ef3602 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 29 Oct 2023 21:25:17 +0000 Subject: [PATCH] csgo-vulkan-fix: throw a runtime_error on failed hooks --- csgo-vulkan-fix/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/csgo-vulkan-fix/main.cpp b/csgo-vulkan-fix/main.cpp index 3409757..a3aec34 100644 --- a/csgo-vulkan-fix/main.cpp +++ b/csgo-vulkan-fix/main.cpp @@ -100,8 +100,10 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { if (hkResult) HyprlandAPI::addNotification(PHANDLE, "[csgo-vulkan-fix] Initialized successfully! (CS2 version)", CColor{0.2, 1.0, 0.2, 1.0}, 5000); - else + else { HyprlandAPI::addNotification(PHANDLE, "[csgo-vulkan-fix] Failure in initialization (hook failed)!", CColor{1.0, 0.2, 0.2, 1.0}, 5000); + throw std::runtime_error("[csgo-vk-fix] Hooks failed"); + } return {"csgo-vulkan-fix", "A plugin to fix incorrect mouse offsets on csgo in Vulkan", "Vaxry", "1.1"}; }