Force load vulkan loader in rtx remix

LFX and AL+ should now work in rtx remix. AL+ seems to lower fps quite a bit for some reason. Not quite sure why as that doesn't happen in NMS.
This commit is contained in:
FakeMichau
2025-10-02 20:54:47 +02:00
parent f23fa666d8
commit 1c3bb60edb
+19 -7
View File
@@ -50,16 +50,28 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
spdlog::info("Config save_pcl_to_file: {}", Config::get().get_save_pcl_to_file() ? "true" : "false");
{
// TODO: won't work for late loaded vulkan-1.dll
auto vulkan_module = GetModuleHandleA("vulkan-1.dll");
VulkanHooks::hook_vulkan(vulkan_module);
}
{
char exe_path[MAX_PATH] = {0};
char exe_path[MAX_PATH] = { 0 };
GetModuleFileNameA(nullptr, exe_path, MAX_PATH);
const char* exe_name = strrchr(exe_path, '\\');
exe_name = exe_name ? exe_name + 1 : exe_path;
// TODO: won't work for late loaded vulkan-1.dll
auto vulkan_module = GetModuleHandleA("vulkan-1.dll");
// HACK: Force load vulkan-1 in rtx remix
// Avoids having to wait for the game to load it
const bool force_load = _stricmp(exe_name, "NvRemixBridge.exe") == 0;
if (!vulkan_module && force_load) {
vulkan_module = LoadLibraryA("vulkan-1.dll");
if (!vulkan_module) {
spdlog::warn("Failed to load vulkan-1.dll");
} else {
spdlog::info("vulkan-1.dll loaded");
}
}
VulkanHooks::hook_vulkan(vulkan_module);
if (_stricmp(exe_name, "MonsterHunterRise.exe") == 0) {
spdlog::info("MonsterHunterRise.exe detected, killing config monitoring");
Config::get().kill_config_monitoring();