mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 13:27:58 +03:00
Added error message if included DirectX DLLs are missing (#998)
* Added error message if included DirectX DLLs are missing * locale: added System_Win32_MissingDLLs localisation Co-Authored-By: LJSTAR <31629427+LJSTARbird@users.noreply.github.com> Co-Authored-By: Kitzuku <25226941+Kitzuku@users.noreply.github.com> Co-Authored-By: NextinHKRY <38560522+NextinMono@users.noreply.github.com> Co-Authored-By: brianuuu <38166666+brianuuu@users.noreply.github.com> Co-Authored-By: Darío <538504+DarioSamo@users.noreply.github.com> * Fix ifdefs --------- Co-authored-by: LJSTAR <31629427+LJSTARbird@users.noreply.github.com> Co-authored-by: Kitzuku <25226941+Kitzuku@users.noreply.github.com> Co-authored-by: NextinHKRY <38560522+NextinMono@users.noreply.github.com> Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com> Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com>
This commit is contained in:
parent
c19a7b1e11
commit
c64ef1fe15
3 changed files with 35 additions and 0 deletions
|
@ -692,6 +692,17 @@ std::unordered_map<std::string_view, std::unordered_map<ELanguage, std::string>>
|
|||
{ ELanguage::Italian, "Impossibile creare un backend D3D12 (Windows) o Vulkan.\n\nAssicurati che:\n\n- Il tuo sistema soddisfi i requisiti minimi.\n- I driver della scheda grafica siano aggiornati.\n- Il tuo sistema operativo sia aggiornato." }
|
||||
}
|
||||
},
|
||||
{
|
||||
"System_Win32_MissingDLLs",
|
||||
{
|
||||
{ ELanguage::English, "The module \"%s\" could not be found.\n\nPlease make sure that:\n\n- You extracted this copy of Unleashed Recompiled fully and not just the *.exe file.\n- You are not running Unleashed Recompiled from a *.zip file." },
|
||||
{ ELanguage::Japanese, "モジュール\"%s\"が見つかりませんでした\n\n次の点を確認してください:\n\n※Unleashed Recompiledの*.exeファイルだけを抽出していなく、 コピーを完全に抽出してること\n※Unleashed Recompiledを*.zipファイルから実行していないこと" },
|
||||
{ ELanguage::German, "Das Modul \"%s\" konnte nicht gefunden werden.\n\nBitte stelle sicher, dass:\n\n- Diese Kopie von Unleashed Recompiled vollständig entpackt wurde und nicht nur die *.exe-Datei.\n- Unleashed Recompiled nicht direkt aus einer *.zip-Datei ausgeführt wird." },
|
||||
{ ELanguage::French, "Le module \"%s\" n'a pas pu être trouvé.\n\nVeuillez vous assurer que :\n\n- Vous avez extrait Unleashed Recompiled dans son entièreté et pas seulement le fichier *.exe.\n- Vous n'exécutez pas Unleashed Recompiled à partir d'un fichier *.zip." },
|
||||
{ ELanguage::Spanish, "No se pudo encontrar el módulo \"%s\".\n\nAsegúrese de que:\n\n- Ha extraido esta copia de Unleashed Recompiled por completo y no solo el archivo *.exe.\n- No está ejecutando Unleashed Recompiled desde un archivo *.zip." },
|
||||
{ ELanguage::Italian, "Impossibile trovare il modulo \"%s\".\n\nAssicurati che:\n\n- Hai estratto questa copia di Unleashed Recompiled correttamente e non solo il file *.exe.\n- Non stai eseguendo Unleashed Recompiled da un file *.zip." }
|
||||
}
|
||||
},
|
||||
{
|
||||
"Common_On",
|
||||
{
|
||||
|
|
|
@ -28,6 +28,15 @@
|
|||
#include <timeapi.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(UNLEASHED_RECOMP_D3D12)
|
||||
static std::array<std::string_view, 3> g_D3D12RequiredModules =
|
||||
{
|
||||
"D3D12/D3D12Core.dll",
|
||||
"dxcompiler.dll",
|
||||
"dxil.dll"
|
||||
};
|
||||
#endif
|
||||
|
||||
const size_t XMAIOBegin = 0x7FEA0000;
|
||||
const size_t XMAIOEnd = XMAIOBegin + 0x0000FFFF;
|
||||
|
||||
|
@ -204,6 +213,19 @@ int main(int argc, char *argv[])
|
|||
|
||||
Config::Load();
|
||||
|
||||
#if defined(_WIN32) && defined(UNLEASHED_RECOMP_D3D12)
|
||||
for (auto& dll : g_D3D12RequiredModules)
|
||||
{
|
||||
if (!std::filesystem::exists(g_executableRoot / dll))
|
||||
{
|
||||
char text[512];
|
||||
snprintf(text, sizeof(text), Localise("System_Win32_MissingDLLs").c_str(), dll.data());
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, GameWindow::GetTitle(), text, GameWindow::s_pWindow);
|
||||
std::_Exit(1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check the time since the last time an update was checked. Store the new time if the difference is more than six hours.
|
||||
constexpr double TimeBetweenUpdateChecksInSeconds = 6 * 60 * 60;
|
||||
time_t timeNow = std::time(nullptr);
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#define GAME_INSTALL_DIRECTORY "."
|
||||
#endif
|
||||
|
||||
extern std::filesystem::path g_executableRoot;
|
||||
|
||||
inline std::filesystem::path GetGamePath()
|
||||
{
|
||||
return GAME_INSTALL_DIRECTORY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue