mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-12 14:57:20 +00:00
[client] windows: use precise math for input validation
This commit is contained in:
@@ -8,6 +8,16 @@ add_library(displayserver_Windows STATIC
|
||||
windows.c
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_source_files_properties(input_event.c PROPERTIES
|
||||
COMPILE_OPTIONS "/fp:precise"
|
||||
)
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set_source_files_properties(input_event.c PROPERTIES
|
||||
COMPILE_OPTIONS "-fno-fast-math"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(displayserver_Windows PRIVATE
|
||||
WINVER=0x0A00
|
||||
_WIN32_WINNT=0x0A00
|
||||
|
||||
@@ -498,6 +498,17 @@ add_executable(windows-input-tests
|
||||
../displayservers/Windows/window_size.c
|
||||
../src/kb.c
|
||||
)
|
||||
if(MSVC)
|
||||
set_source_files_properties(
|
||||
../displayservers/Windows/input_event.c PROPERTIES
|
||||
COMPILE_OPTIONS "/fp:precise"
|
||||
)
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set_source_files_properties(
|
||||
../displayservers/Windows/input_event.c PROPERTIES
|
||||
COMPILE_OPTIONS "-fno-fast-math"
|
||||
)
|
||||
endif()
|
||||
target_compile_definitions(windows-input-tests PRIVATE
|
||||
CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user