mirror of
https://github.com/rt64/rt64.git
synced 2024-12-25 18:14:31 +00:00
chore(ci): Run workflow with clang on windows (#68)
* chore(ci): Run workflow with clang on windows * fix compilation issue
This commit is contained in:
parent
825e5a8c78
commit
cb631739b0
5
.github/workflows/validate.yml
vendored
5
.github/workflows/validate.yml
vendored
@ -67,5 +67,8 @@ jobs:
|
||||
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
|
||||
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
||||
# remove LLVM from PATH so it doesn't overshadow the one provided by VS
|
||||
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';'
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
||||
cmake --build cmake-build --config ${{ matrix.type }} --target rt64 -j $cpuCores
|
||||
|
@ -424,7 +424,7 @@ namespace RT64 {
|
||||
scaledWidth = uint32_t(expandedColorWidthClamped);
|
||||
scaledHeight = uint32_t(colorHeightClamped);
|
||||
|
||||
const long expandedPixels = std::labs(scaledWidth - nativeColorWidthClamped) / 2;
|
||||
const long expandedPixels = std::labs(long(scaledWidth) - nativeColorWidthClamped) / 2;
|
||||
const long nativeAlignment = std::max(lround(resolutionScale.y), 1L);
|
||||
misalignmentX = (nativeAlignment - (expandedPixels % nativeAlignment)) % nativeAlignment;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user