Fix windows workflow (#322)
This commit is contained in:
parent
731c00d504
commit
5fbc05d21d
1
.github/workflows/windows.yml
vendored
1
.github/workflows/windows.yml
vendored
@ -40,6 +40,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir packaged
|
mkdir packaged
|
||||||
cp -r build/* packaged/
|
cp -r build/* packaged/
|
||||||
|
cp C:/Windows/System32/msvcp140.dll packaged/Release/msvcp140.dll
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ctest --output-on-failure --test-dir build
|
run: ctest --output-on-failure --test-dir build
|
||||||
|
|||||||
@ -29,7 +29,7 @@ if(MSVC)
|
|||||||
else()
|
else()
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
|
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /source-charset:UTF-8")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /source-charset:UTF-8 /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
|
||||||
else()
|
else()
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra
|
||||||
# additional warnings
|
# additional warnings
|
||||||
|
|||||||
@ -111,13 +111,6 @@ mousecode input_util::mousecode_from(const std::string& name) {
|
|||||||
|
|
||||||
std::string input_util::to_string(keycode code) {
|
std::string input_util::to_string(keycode code) {
|
||||||
int icode_repr = static_cast<int>(code);
|
int icode_repr = static_cast<int>(code);
|
||||||
#ifdef _WIN32
|
|
||||||
char name[64];
|
|
||||||
int result =
|
|
||||||
GetKeyNameTextA(glfwGetKeyScancode(icode_repr) << 16, name, 64);
|
|
||||||
if (result == 0) return "Unknown";
|
|
||||||
return name;
|
|
||||||
#else
|
|
||||||
const char* name =
|
const char* name =
|
||||||
glfwGetKeyName(icode_repr, glfwGetKeyScancode(icode_repr));
|
glfwGetKeyName(icode_repr, glfwGetKeyScancode(icode_repr));
|
||||||
if (name == nullptr) {
|
if (name == nullptr) {
|
||||||
@ -207,7 +200,6 @@ std::string input_util::to_string(keycode code) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return std::string(name);
|
return std::string(name);
|
||||||
#endif // _WIN32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string input_util::to_string(mousecode code) {
|
std::string input_util::to_string(mousecode code) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user