From 8a99d48ed32c9bacc54c0bfa28610ebccb5380ec Mon Sep 17 00:00:00 2001 From: hoshinohikari Date: Sat, 22 Jun 2024 23:35:54 +0800 Subject: [PATCH 1/2] fetch cuda 12.4 and 12.5 --- NVEncCore/NVEncFilterResize.cu | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NVEncCore/NVEncFilterResize.cu b/NVEncCore/NVEncFilterResize.cu index 91f8fbc3..37a454da 100644 --- a/NVEncCore/NVEncFilterResize.cu +++ b/NVEncCore/NVEncFilterResize.cu @@ -117,6 +117,12 @@ const TCHAR *NVRTC_BUILTIN_DLL_NAME_TSTR = _T("nvrtc-builtins64_122.dll"); #elif __CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ == 3 const TCHAR *NVRTC_DLL_NAME_TSTR = _T("nvrtc64_120_0.dll"); const TCHAR *NVRTC_BUILTIN_DLL_NAME_TSTR = _T("nvrtc-builtins64_123.dll"); +#elif __CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ == 4 +const TCHAR* NVRTC_DLL_NAME_TSTR = _T("nvrtc64_120_0.dll"); +const TCHAR* NVRTC_BUILTIN_DLL_NAME_TSTR = _T("nvrtc-builtins64_124.dll"); +#elif __CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ == 5 +const TCHAR* NVRTC_DLL_NAME_TSTR = _T("nvrtc64_120_0.dll"); +const TCHAR* NVRTC_BUILTIN_DLL_NAME_TSTR = _T("nvrtc-builtins64_125.dll"); #endif #else //#if defined(_WIN32) || defined(_WIN64) const TCHAR *NPPI_DLL_NAME_TSTR = _T("libnppc.so"); From 796026f9fe1efbdb712a3187b43d838e4d8cb82f Mon Sep 17 00:00:00 2001 From: hoshinohikari Date: Sat, 22 Jun 2024 23:39:22 +0800 Subject: [PATCH 2/2] fix file input issues in Chinese environment --- NVEncC/NVEncC.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/NVEncC/NVEncC.cpp b/NVEncC/NVEncC.cpp index f28ff233..0eb9655d 100644 --- a/NVEncC/NVEncC.cpp +++ b/NVEncC/NVEncC.cpp @@ -254,6 +254,11 @@ bool check_locale_is_ja() { return GetUserDefaultLangID() == LangID_ja_JP; } +bool check_locale_is_chs() { + const WORD LangID_zh_CN = MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED); + return GetUserDefaultLangID() == LangID_zh_CN; +} + static tstring getErrorFmtStr(uint32_t err) { TCHAR errmes[4097]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, NULL, errmes, _countof(errmes), NULL); @@ -367,7 +372,10 @@ int _tmain(int argc, TCHAR **argv) { #if defined(_WIN32) || defined(_WIN64) if (check_locale_is_ja()) { _tsetlocale(LC_ALL, _T("Japanese")); - } + } + else if (check_locale_is_chs()) { + _tsetlocale(LC_ALL, _T(".UTF8")); + } #endif //#if defined(_WIN32) || defined(_WIN64) if (argc == 1) {