fix: Multiple FreeBSD build and run errors

This commit is contained in:
WerWolv
2025-08-10 22:38:12 +02:00
parent 8c9f3fa569
commit 23d673f920
4 changed files with 9 additions and 2 deletions

View File

@@ -3,6 +3,8 @@
#include <stdexcept>
#include <fcntl.h>
#include <sys/file.h>
#include <unistd.h>
#include <jthread.hpp>
#include <hex/helpers/logger.hpp>
#include <hex/api/events/events_lifecycle.hpp>

View File

@@ -352,7 +352,7 @@ namespace hex {
while (frameTime < targetFrameTime - longestExceededFrameTime) {
auto remainingFrameTime = targetFrameTime - frameTime;
glfwWaitEventsTimeout(remainingFrameTime);
glfwWaitEventsTimeout(std::min(remainingFrameTime, 1000.0));
auto newFrameTime = glfwGetTime() - frameTimeStart;

View File

@@ -5,7 +5,12 @@ add_executable(updater
)
target_compile_definitions(updater PRIVATE IMHEX_PROJECT_NAME="${PROJECT_NAME}")
target_link_libraries(updater PRIVATE libimhex ${FMT_LIBRARIES})
if (UNIX OR BSD)
target_link_libraries(updater PRIVATE pthread)
endif()
add_dependencies(main updater)
setupCompilerFlags(updater)