mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Compare commits
9 commits
2fad39e730
...
fdbef9bd0a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdbef9bd0a | ||
|
|
3c1badf183 | ||
|
|
12fe00ce73 | ||
|
|
135137d0a4 | ||
|
|
4ff4778540 | ||
|
|
d4f311da36 | ||
|
|
ec13b6f0f6 | ||
|
|
2afc09295d | ||
|
|
e0b2c82b6b |
5 changed files with 25 additions and 24 deletions
|
|
@ -23,10 +23,6 @@ if (APPLE)
|
||||||
enable_language(OBJC OBJCXX)
|
enable_language(OBJC OBJCXX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
||||||
set(SDL_VULKAN_ENABLED ON CACHE BOOL "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (CMAKE_OSX_ARCHITECTURES)
|
if (CMAKE_OSX_ARCHITECTURES)
|
||||||
set(UNLEASHED_RECOMP_ARCHITECTURE ${CMAKE_OSX_ARCHITECTURES})
|
set(UNLEASHED_RECOMP_ARCHITECTURE ${CMAKE_OSX_ARCHITECTURES})
|
||||||
elseif(CMAKE_SYSTEM_PROCESSOR)
|
elseif(CMAKE_SYSTEM_PROCESSOR)
|
||||||
|
|
|
||||||
|
|
@ -352,23 +352,13 @@ if (UNLEASHED_RECOMP_FLATPAK)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (UNLEASHED_RECOMP_D3D12)
|
|
||||||
find_package(directx-headers CONFIG REQUIRED)
|
|
||||||
find_package(directx12-agility CONFIG REQUIRED)
|
|
||||||
target_compile_definitions(UnleashedRecomp PRIVATE
|
|
||||||
UNLEASHED_RECOMP_D3D12
|
|
||||||
D3D12MA_USING_DIRECTX_HEADERS
|
|
||||||
D3D12MA_OPTIONS16_SUPPORTED
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (SDL_VULKAN_ENABLED)
|
|
||||||
target_compile_definitions(UnleashedRecomp PRIVATE SDL_VULKAN_ENABLED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
|
|
||||||
if (UNLEASHED_RECOMP_D3D12)
|
if (UNLEASHED_RECOMP_D3D12)
|
||||||
|
find_package(directx-headers CONFIG REQUIRED)
|
||||||
|
find_package(directx12-agility CONFIG REQUIRED)
|
||||||
|
target_compile_definitions(UnleashedRecomp PRIVATE UNLEASHED_RECOMP_D3D12)
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/D3D12)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/D3D12)
|
||||||
add_custom_command(TARGET UnleashedRecomp POST_BUILD
|
add_custom_command(TARGET UnleashedRecomp POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> $<TARGET_FILE_DIR:UnleashedRecomp>/D3D12
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> $<TARGET_FILE_DIR:UnleashedRecomp>/D3D12
|
||||||
|
|
@ -379,9 +369,6 @@ if (UNLEASHED_RECOMP_D3D12)
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(UnleashedRecomp PRIVATE
|
target_link_libraries(UnleashedRecomp PRIVATE
|
||||||
Microsoft::DirectX-Headers
|
|
||||||
Microsoft::DirectX-Guids
|
|
||||||
Microsoft::DirectX12-Agility
|
|
||||||
Microsoft::DirectXShaderCompiler
|
Microsoft::DirectXShaderCompiler
|
||||||
Microsoft::DXIL
|
Microsoft::DXIL
|
||||||
dxgi
|
dxgi
|
||||||
|
|
|
||||||
|
|
@ -324,13 +324,18 @@ void hid::Init()
|
||||||
{
|
{
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, "1");
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1");
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, "1");
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAM, "1");
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK, "1");
|
||||||
SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "1");
|
SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "1");
|
||||||
|
|
||||||
SDL_SetHint(SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS, "0"); // Uses Button Labels. This hint is disabled for Nintendo Controllers.
|
SDL_SetHint(SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS, "0"); // Uses Button Labels. This hint is disabled for Nintendo Controllers.
|
||||||
|
|
@ -339,6 +344,11 @@ void hid::Init()
|
||||||
SDL_AddEventWatch(HID_OnSDLEvent, nullptr);
|
SDL_AddEventWatch(HID_OnSDLEvent, nullptr);
|
||||||
|
|
||||||
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
|
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
|
||||||
|
|
||||||
|
// Load controller mappings from SDL_GameControllerDB
|
||||||
|
if (int mappings = SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); mappings > 0) {
|
||||||
|
LOGFN("Loaded {} controller mapping(s) from SDL_GameControllerDB ({})", mappings, "gamecontrollerdb.txt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t hid::GetState(uint32_t dwUserIndex, XAMINPUT_STATE* pState)
|
uint32_t hid::GetState(uint32_t dwUserIndex, XAMINPUT_STATE* pState)
|
||||||
|
|
|
||||||
8
thirdparty/CMakeLists.txt
vendored
8
thirdparty/CMakeLists.txt
vendored
|
|
@ -15,6 +15,14 @@ set(SDL2MIXER_OPUS OFF)
|
||||||
set(SDL2MIXER_VORBIS "VORBISFILE")
|
set(SDL2MIXER_VORBIS "VORBISFILE")
|
||||||
set(SDL2MIXER_WAVPACK OFF)
|
set(SDL2MIXER_WAVPACK OFF)
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
|
set(SDL_VULKAN_ENABLED ON CACHE BOOL "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(D3D12_AGILITY_SDK_ENABLED ON CACHE BOOL "")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/msdf-atlas-gen")
|
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/msdf-atlas-gen")
|
||||||
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/nativefiledialog-extended")
|
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/nativefiledialog-extended")
|
||||||
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/o1heap")
|
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/o1heap")
|
||||||
|
|
|
||||||
2
thirdparty/plume
vendored
2
thirdparty/plume
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit fffeb35f836d8c945697ec82b735e77db401e2de
|
Subproject commit 11926860e878e68626ea99ec88562ce2b8badc4f
|
||||||
Loading…
Add table
Reference in a new issue