several fixes (#112)

* updated fmt

* submodules updated

* fixed _TIMESPEC_DEFINED for winpthreads under windows

* fixed sdl3 under qt

* virtual_memory: Ensure mapped addresses stay inside the user area

* Fixes LLE Libc crashing on linux

---------

Co-authored-by: GPUCode <geoster3d@gmail.com>
This commit is contained in:
georgemoralis 2024-04-13 22:37:21 +03:00 committed by GitHub
parent 5ed4891a1f
commit e99129d72f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 20 additions and 26 deletions

View file

@ -14,12 +14,6 @@ project(shadps4)
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
if(ENABLE_QT_GUI)
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent)
qt_standard_project_setup()
set(CMAKE_AUTORCC ON)
endif()
# This function should be passed a list of all files in a target. It will automatically generate
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
# one in the filesystem.
@ -93,6 +87,12 @@ add_subdirectory(externals)
add_subdirectory(third-party)
include_directories(src)
if(ENABLE_QT_GUI)
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent)
qt_standard_project_setup()
set(CMAKE_AUTORCC ON)
endif()
set(AUDIO_CORE src/audio_core/sdl_audio.cpp
src/audio_core/sdl_audio.h
)
@ -331,7 +331,7 @@ endif()
create_target_directory_groups(shadps4)
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11)
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 SDL3-shared)
target_link_libraries(shadps4 PRIVATE discord-rpc vulkan-1 xxhash Zydis)
if(NOT ENABLE_QT_GUI)
@ -352,6 +352,7 @@ if (WIN32)
target_link_libraries(shadps4 PRIVATE mincore winpthread clang_rt.builtins-x86_64.lib)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
add_definitions(-D_TIMESPEC_DEFINED) #needed for conflicts with time.h of windows.h
endif()
if(WIN32)
@ -373,12 +374,10 @@ add_custom_command(TARGET shadps4 POST_BUILD
$<TARGET_FILE_DIR:shadps4>
)
if(NOT ENABLE_QT_GUI)
add_custom_command(TARGET shadps4 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:SDL3-shared>
$<TARGET_FILE_DIR:shadps4>)
endif()
if (WIN32)
add_custom_command(TARGET shadps4 POST_BUILD