early-access version 3417

This commit is contained in:
pineappleEA 2023-02-26 18:54:57 +01:00
parent cb3c84e5fa
commit 05a3ee8166
5 changed files with 21 additions and 30 deletions

View File

@ -242,6 +242,9 @@ endif()
if (ENABLE_WEB_SERVICE)
find_package(cpp-jwt 1.4 CONFIG)
find_package(httplib 0.12 MODULE)
if (NOT cpp-jwt_FOUND OR NOT httplib_FOUND)
find_package(OpenSSL 1.1 MODULE COMPONENTS Crypto SSL)
endif()
endif()
if (YUZU_TESTS)

View File

@ -1,7 +1,7 @@
yuzu emulator early access
=============
This is the source code for early-access 3416.
This is the source code for early-access 3417.
## Legal Notice

View File

@ -100,17 +100,9 @@ endif()
# Sirit
add_subdirectory(sirit EXCLUDE_FROM_ALL)
# httplib
if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
if (NOT WIN32)
find_package(OpenSSL 1.1)
if (OPENSSL_FOUND)
set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
endif()
endif()
if (WIN32 OR NOT OPENSSL_FOUND)
# LibreSSL
if (ENABLE_WEB_SERVICE AND DEFINED OPENSSL_FOUND)
if (WIN32 OR NOT OPENSSL_FOUND)
set(LIBRESSL_SKIP_INSTALL ON)
set(OPENSSLDIR "/etc/ssl/")
add_subdirectory(libressl EXCLUDE_FROM_ALL)
@ -119,8 +111,13 @@ if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
get_directory_property(OPENSSL_LIBRARIES
DIRECTORY libressl
DEFINITION OPENSSL_LIBS)
else()
set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
endif()
endif()
# httplib
if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
add_library(httplib INTERFACE)
target_include_directories(httplib INTERFACE ./cpp-httplib)
target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT)
@ -136,6 +133,7 @@ if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt)
add_library(cpp-jwt INTERFACE)
target_include_directories(cpp-jwt INTERFACE ./cpp-jwt/include)
target_compile_definitions(cpp-jwt INTERFACE CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
target_link_libraries(cpp-jwt INTERFACE ${OPENSSL_LIBRARIES})
add_library(cpp-jwt::cpp-jwt ALIAS cpp-jwt)
endif()

View File

@ -36,23 +36,18 @@ VkSurfaceFormatKHR ChooseSwapSurfaceFormat(vk::Span<VkSurfaceFormatKHR> formats)
VkPresentModeKHR ChooseSwapPresentMode(vk::Span<VkPresentModeKHR> modes) {
// Mailbox (triple buffering) doesn't lock the application like fifo (vsync),
// prefer it if vsync option is not selected
// AMD proprietary drivers can't render past the screen's refresh rate
const auto found_mailbox = std::find(modes.begin(), modes.end(), VK_PRESENT_MODE_MAILBOX_KHR);
const auto found_imm = std::find(modes.begin(), modes.end(), VK_PRESENT_MODE_IMMEDIATE_KHR);
if (!Settings::values.use_speed_limit.GetValue() && found_imm != modes.end()) {
return VK_PRESENT_MODE_IMMEDIATE_KHR;
}
if (Settings::values.use_vsync.GetValue()) {
if (found_mailbox != modes.end()) {
if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Borderless &&
found_mailbox != modes.end() && !Settings::values.use_vsync.GetValue()) {
return VK_PRESENT_MODE_MAILBOX_KHR;
}
} else {
if (!Settings::values.use_speed_limit.GetValue()) {
// FIFO present mode locks the framerate to the monitor's refresh rate,
// Find an alternative to surpass this limitation if FPS is unlocked.
const auto found_imm = std::find(modes.begin(), modes.end(), VK_PRESENT_MODE_IMMEDIATE_KHR);
if (found_imm != modes.end()) {
return VK_PRESENT_MODE_IMMEDIATE_KHR;
}
if (found_mailbox != modes.end()) {
return VK_PRESENT_MODE_MAILBOX_KHR;
}
}
return VK_PRESENT_MODE_FIFO_KHR;
}

View File

@ -542,19 +542,14 @@ void QtControllerSelectorDialog::UpdateControllerState(std::size_t player_index)
const auto player_connected = player_groupboxes[player_index]->isChecked() &&
controller_type != Core::HID::NpadStyleIndex::Handheld;
if (controller->GetNpadStyleIndex(true) == controller_type &&
controller->IsConnected(true) == player_connected) {
return;
}
// Disconnect the controller first.
UpdateController(controller, controller_type, false);
// Handheld
if (player_index == 0) {
auto* handheld = system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld);
UpdateController(handheld, controller_type, false);
if (controller_type == Core::HID::NpadStyleIndex::Handheld) {
auto* handheld =
system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld);
UpdateController(handheld, Core::HID::NpadStyleIndex::Handheld,
player_groupboxes[player_index]->isChecked());
}