Invert blender check, fix windows build

This commit is contained in:
Phillip Stephens 2021-03-10 11:57:02 -08:00
parent 6bf1476b1d
commit 4da7ca5930
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
set(QUAZIP_INSTALL OFF CACHE BOOL "") set(QUAZIP_INSTALL OFF CACHE BOOL "")
add_subdirectory(quazip) add_subdirectory(quazip)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64)
set(VectorISATableModel_HEADER VectorISATableModelIntel.hpp) set(VectorISATableModel_HEADER VectorISATableModelIntel.hpp)
else () else ()
set(VectorISATableModel_HEADER "") set(VectorISATableModel_HEADER "")

View File

@ -51,9 +51,9 @@ hecl::SystemString FindBlender(int& major, int& minor) {
/* No steam; try default */ /* No steam; try default */
wchar_t progFiles[256]; wchar_t progFiles[256];
if (GetEnvironmentVariableW(L"ProgramFiles", progFiles, 256)) { if (GetEnvironmentVariableW(L"ProgramFiles", progFiles, 256)) {
for (size_t major = MinBlenderMajorSearch; major <= MaxBlenderMajorSearch; ++major) { for (size_t major = MaxBlenderMajorSearch; major >= MinBlenderMajorSearch; --major) {
bool found = false; bool found = false;
for (size_t minor = MinBlenderMinorSearch; minor <= MaxBlenderMinorSearch; ++minor) { for (size_t minor = MaxBlenderMinorSearch; minor > MinBlenderMinorSearch; --minor) {
_snwprintf(BLENDER_BIN_BUF, 2048, L"%s\\Blender Foundation\\Blender %i.%i\\blender.exe", progFiles, major, _snwprintf(BLENDER_BIN_BUF, 2048, L"%s\\Blender Foundation\\Blender %i.%i\\blender.exe", progFiles, major,
minor); minor);
if (RegFileExists(BLENDER_BIN_BUF)) { if (RegFileExists(BLENDER_BIN_BUF)) {