Skip to content

Commit

Permalink
Open a link, if some files are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
vs-shirokii committed Aug 3, 2024
1 parent bda5e91 commit 2c3daf0
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/common/rendering/rt/rt_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "rt_state.h"

#include <shellapi.h>

#include <filesystem>
#include <span>
#include <variant>
Expand Down Expand Up @@ -2022,6 +2024,7 @@ Win32RTVideo::Win32RTVideo()
{ "rt/bin/sl.dlss.dll", RT_FEATURE_DLSS3_FG },
{ "rt/bin/sl.dlss_g.dll", RT_FEATURE_DLSS3_FG },
{ "rt/bin/sl.reflex.dll", RT_FEATURE_DLSS3_FG },
{ "rt/bin/sl.pcl.dll", RT_FEATURE_DLSS3_FG },
{ "rt/bin/sl.common.dll", RT_FEATURE_DLSS3_FG },
{ "rt/bin/sl.interposer.dll", RT_FEATURE_DLSS3_FG },
{ "rt/bin/ffx_fsr2_x64.dll", RT_FEATURE_FSR2 },
Expand Down Expand Up @@ -2054,7 +2057,7 @@ Win32RTVideo::Win32RTVideo()
}
else
{
msg = "These features will NOT be available!\n";
msg = "Features will NOT be available!\n";
// clang-format off
if( failedFeatures & RT_FEATURE_DLSS3_FG) msg += " NVIDIA DLSS3 (AI Frame Generation)\n";
if( failedFeatures & RT_FEATURE_DLSS2 ) msg += " NVIDIA DLSS2 (AI Upscaling)\n";
Expand All @@ -2063,20 +2066,20 @@ Win32RTVideo::Win32RTVideo()
// clang-format on
}

msg += "\nBecause the folder \'rt/bin/\' doesn't contain:\n";
msg += "\nReason: \'rt/bin/\' folder doesn't contain:\n";
msg += failedPaths;
msg += "\n(To suppress this warning, use \'-nodllcheck\' argument)";
// msg += "\n(To suppress this warning, use \'-nodllcheck\' argument)";
msg += "\nPress YES to open Renderer's Download page.";
msg += "\nPress NO to proceed with limited feature set.";

MessageBoxA( nullptr, msg.c_str(), "DLL check failure", MB_ICONEXCLAMATION | MB_OK );
HWND parenthwnd = 0;

// TODO: add a link to the download page
int r = MessageBoxA( nullptr,
"\'GZDoom: Ray Traced\' will NOT have a full feature set...\n\n"
"Are you sure you want to continue?",
"DLL check failure",
MB_ICONEXCLAMATION | MB_YESNO );
if( r != IDYES )
int l = MessageBoxA(
parenthwnd, msg.c_str(), "DLL check failure", MB_ICONEXCLAMATION | MB_YESNO );
if( l == IDYES )
{
ShellExecute(
nullptr, 0, L"https://github.com/vs-shirokii/RTGL/releases", 0, 0, SW_SHOW );
exit( -1 );
}
}
Expand Down

0 comments on commit 2c3daf0

Please sign in to comment.