Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Test Windows build without clang-cl #80

Merged
merged 5 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- name: install-deps
run: vcpkg install --triplet x64-windows gtest lua
- name: configure
run: cmake -B build -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -T ClangCL
run: cmake -B build -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
- name: make
run: cmake --build build --target hydra --config Release
25 changes: 1 addition & 24 deletions include/compatibility.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,29 +104,6 @@ namespace hydra
return (x >> 8) | (x << 8);
}

__attribute__((target("movbe"))) inline uint32_t bswap32(uint32_t x)
{
#ifdef _load_be_u32
return _load_be_u32(&x);
#else
return (x >> 24) | ((x >> 8) & 0xff00) | ((x & 0xff00) << 8) | (x << 24);
#endif
}

#ifdef __has_attribute
__attribute__((target("movbe")))
#endif
inline uint64_t
bswap64(uint64_t x)
{
#ifdef _load_be_u64
return _load_be_u64(&x);
#else
return (x >> 56) | ((x >> 40) & 0xff00) | ((x >> 24) & 0xff0000) | ((x >> 8) & 0xff000000) |
((x & 0xff000000) << 8) | ((x & 0xff0000) << 24) | ((x & 0xff00) << 40) | (x << 56);
#endif
}

// inline uint32_t crc32_u8(uint32_t crc, uint8_t data)
// {
// #if defined(HYDRA_ARM)
Expand Down Expand Up @@ -229,4 +206,4 @@ namespace hydra
return splits;
}

} // namespace hydra
} // namespace hydra
6 changes: 3 additions & 3 deletions include/hsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#pragma message("Unknown platform")
#endif

#if defined(__x86_64__)
#if defined(__x86_64__) || defined(__x86_64) || defined(__amd64) || defined(_M_X64)
#define HYDRA_X86_64
#elif defined(__i386__)
#elif defined(__i386__) || defined(__i386) || defined(_M_IX86)
#define HYDRA_X86
#elif defined(__arm__) || defined(__aarch64__) || defined(__arm64__)
#define HYDRA_ARM
Expand Down Expand Up @@ -52,4 +52,4 @@
#define hydra_inline __forceinline
#else
#define hydra_inline inline
#endif
#endif
8 changes: 5 additions & 3 deletions qt/keypicker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ void InputPage::onRemoveButtonClicked()
combo->removeItem(index);
}

std::string path = Settings::GetSavePath() / "mappings" / (current_name + ".json");
if (std::remove(path.c_str()) != 0)
auto path = Settings::GetSavePath() / "mappings" / (current_name + ".json");
std::error_code ec;
std::filesystem::remove(path, ec);
if (ec)
{
QMessageBox::warning(this, "Warning",
QString("Failed to remove mapping file: ") + path.c_str());
Expand Down Expand Up @@ -583,4 +585,4 @@ void InputPage::set_buttons(ButtonPage page)
break;
}
};
}
}
Loading