early-access version 2104
This commit is contained in:
parent
b5bacdc486
commit
4981320657
30 changed files with 314 additions and 181 deletions
|
@ -237,7 +237,7 @@ yuzu_find_packages()
|
||||||
|
|
||||||
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
|
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
|
||||||
if(ENABLE_QT)
|
if(ENABLE_QT)
|
||||||
set(QT_VERSION 5.12)
|
set(QT_VERSION 5.15)
|
||||||
# We want to load the generated conan qt config so that we get the QT_ROOT var so that we can use the official
|
# We want to load the generated conan qt config so that we get the QT_ROOT var so that we can use the official
|
||||||
# Qt5Config inside the root folder instead of the conan generated one.
|
# Qt5Config inside the root folder instead of the conan generated one.
|
||||||
if(EXISTS ${CMAKE_BINARY_DIR}/qtConfig.cmake)
|
if(EXISTS ${CMAKE_BINARY_DIR}/qtConfig.cmake)
|
||||||
|
@ -339,8 +339,8 @@ if(ENABLE_QT)
|
||||||
set(QT_PREFIX_HINT)
|
set(QT_PREFIX_HINT)
|
||||||
|
|
||||||
if(YUZU_USE_BUNDLED_QT)
|
if(YUZU_USE_BUNDLED_QT)
|
||||||
if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) AND ARCHITECTURE_x86_64)
|
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||||
set(QT_BUILD qt-5.12.8-msvc2017_64)
|
set(QT_BUILD qt-5.15.2-msvc2019_64)
|
||||||
elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64)
|
elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64)
|
||||||
set(QT_BUILD qt5_5_15_2)
|
set(QT_BUILD qt5_5_15_2)
|
||||||
else()
|
else()
|
||||||
|
@ -369,7 +369,7 @@ endif()
|
||||||
if (ENABLE_SDL2)
|
if (ENABLE_SDL2)
|
||||||
if (YUZU_USE_BUNDLED_SDL2)
|
if (YUZU_USE_BUNDLED_SDL2)
|
||||||
# Detect toolchain and platform
|
# Detect toolchain and platform
|
||||||
if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) AND ARCHITECTURE_x86_64)
|
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||||
set(SDL2_VER "SDL2-2.0.16")
|
set(SDL2_VER "SDL2-2.0.16")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
|
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
|
||||||
|
@ -462,7 +462,7 @@ if (CONAN_REQUIRED_LIBS)
|
||||||
if(ENABLE_QT)
|
if(ENABLE_QT)
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")
|
list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")
|
||||||
list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}")
|
list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}")
|
||||||
find_package(Qt5 5.12 REQUIRED COMPONENTS Widgets)
|
find_package(Qt5 5.15 REQUIRED COMPONENTS Widgets)
|
||||||
if (YUZU_USE_QT_WEB_ENGINE)
|
if (YUZU_USE_QT_WEB_ENGINE)
|
||||||
find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
|
find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -33,6 +33,7 @@ function(copy_yuzu_Qt5_deps target_dir)
|
||||||
Qt5Positioning$<$<CONFIG:Debug>:d>.*
|
Qt5Positioning$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5PrintSupport$<$<CONFIG:Debug>:d>.*
|
Qt5PrintSupport$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Qml$<$<CONFIG:Debug>:d>.*
|
Qt5Qml$<$<CONFIG:Debug>:d>.*
|
||||||
|
Qt5QmlModels$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5Quick$<$<CONFIG:Debug>:d>.*
|
Qt5Quick$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5QuickWidgets$<$<CONFIG:Debug>:d>.*
|
Qt5QuickWidgets$<$<CONFIG:Debug>:d>.*
|
||||||
Qt5WebChannel$<$<CONFIG:Debug>:d>.*
|
Qt5WebChannel$<$<CONFIG:Debug>:d>.*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2101.
|
This is the source code for early-access 2104.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,16 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <numbers>
|
#include <numbers>
|
||||||
|
|
||||||
#include "audio_core/algorithm/interpolate.h"
|
#include "audio_core/algorithm/interpolate.h"
|
||||||
#include "audio_core/command_generator.h"
|
#include "audio_core/command_generator.h"
|
||||||
#include "audio_core/effect_context.h"
|
#include "audio_core/effect_context.h"
|
||||||
#include "audio_core/mix_context.h"
|
#include "audio_core/mix_context.h"
|
||||||
#include "audio_core/voice_context.h"
|
#include "audio_core/voice_context.h"
|
||||||
|
#include "common/common_types.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
namespace AudioCore {
|
namespace AudioCore {
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "audio_core/behavior_info.h"
|
#include "audio_core/behavior_info.h"
|
||||||
#include "audio_core/common.h"
|
#include "audio_core/common.h"
|
||||||
#include "audio_core/effect_context.h"
|
#include "audio_core/effect_context.h"
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "audio_core/behavior_info.h"
|
#include "audio_core/behavior_info.h"
|
||||||
#include "audio_core/voice_context.h"
|
#include "audio_core/voice_context.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
|
@ -79,6 +79,7 @@ add_library(common STATIC
|
||||||
logging/filter.cpp
|
logging/filter.cpp
|
||||||
logging/filter.h
|
logging/filter.h
|
||||||
logging/log.h
|
logging/log.h
|
||||||
|
logging/log_entry.h
|
||||||
logging/text_formatter.cpp
|
logging/text_formatter.cpp
|
||||||
logging/text_formatter.h
|
logging/text_formatter.h
|
||||||
logging/types.h
|
logging/types.h
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <fmt/format.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h> // For OutputDebugStringW
|
#include <windows.h> // For OutputDebugStringW
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,6 +24,7 @@
|
||||||
|
|
||||||
#include "common/logging/backend.h"
|
#include "common/logging/backend.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
#include "common/logging/log_entry.h"
|
||||||
#include "common/logging/text_formatter.h"
|
#include "common/logging/text_formatter.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <algorithm>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
|
#include <fmt/core.h>
|
||||||
|
|
||||||
#include "common/logging/types.h"
|
#include "common/logging/types.h"
|
||||||
|
|
||||||
namespace Common::Log {
|
namespace Common::Log {
|
||||||
|
|
28
src/common/logging/log_entry.h
Executable file
28
src/common/logging/log_entry.h
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright 2021 yuzu Emulator Project
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
|
#include "common/logging/types.h"
|
||||||
|
|
||||||
|
namespace Common::Log {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A log entry. Log entries are store in a structured format to permit more varied output
|
||||||
|
* formatting on different frontends, as well as facilitating filtering and aggregation.
|
||||||
|
*/
|
||||||
|
struct Entry {
|
||||||
|
std::chrono::microseconds timestamp;
|
||||||
|
Class log_class{};
|
||||||
|
Level log_level{};
|
||||||
|
const char* filename = nullptr;
|
||||||
|
unsigned int line_num = 0;
|
||||||
|
std::string function;
|
||||||
|
std::string message;
|
||||||
|
bool final_entry = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Common::Log
|
|
@ -13,6 +13,7 @@
|
||||||
#include "common/common_funcs.h"
|
#include "common/common_funcs.h"
|
||||||
#include "common/logging/filter.h"
|
#include "common/logging/filter.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
#include "common/logging/log_entry.h"
|
||||||
#include "common/logging/text_formatter.h"
|
#include "common/logging/text_formatter.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <chrono>
|
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
namespace Common::Log {
|
namespace Common::Log {
|
||||||
|
@ -131,19 +129,4 @@ enum class Class : u8 {
|
||||||
Count ///< Total number of logging classes
|
Count ///< Total number of logging classes
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* A log entry. Log entries are store in a structured format to permit more varied output
|
|
||||||
* formatting on different frontends, as well as facilitating filtering and aggregation.
|
|
||||||
*/
|
|
||||||
struct Entry {
|
|
||||||
std::chrono::microseconds timestamp;
|
|
||||||
Class log_class{};
|
|
||||||
Level log_level{};
|
|
||||||
const char* filename = nullptr;
|
|
||||||
unsigned int line_num = 0;
|
|
||||||
std::string function;
|
|
||||||
std::string message;
|
|
||||||
bool final_entry = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Common::Log
|
} // namespace Common::Log
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <stdexcept>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "core/hle/kernel/k_auto_object_container.h"
|
#include "core/hle/kernel/k_auto_object_container.h"
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "core/hle/service/am/applets/applet_web_browser.h"
|
#include "core/hle/service/am/applets/applet_web_browser.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
#include "core/hle/service/ns/pl_u.h"
|
#include "core/hle/service/ns/pl_u.h"
|
||||||
|
#include "core/loader/loader.h"
|
||||||
|
|
||||||
namespace Service::AM::Applets {
|
namespace Service::AM::Applets {
|
||||||
|
|
||||||
|
@ -122,6 +123,15 @@ FileSys::VirtualFile GetOfflineRomFS(Core::System& system, u64 title_id,
|
||||||
const auto nca = system.GetContentProvider().GetEntry(title_id, nca_type);
|
const auto nca = system.GetContentProvider().GetEntry(title_id, nca_type);
|
||||||
|
|
||||||
if (nca == nullptr) {
|
if (nca == nullptr) {
|
||||||
|
if (nca_type == FileSys::ContentRecordType::HtmlDocument) {
|
||||||
|
LOG_WARNING(Service_AM, "Falling back to AppLoader to get the RomFS.");
|
||||||
|
FileSys::VirtualFile romfs;
|
||||||
|
system.GetAppLoader().ReadManualRomFS(romfs);
|
||||||
|
if (romfs != nullptr) {
|
||||||
|
return romfs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOG_ERROR(Service_AM,
|
LOG_ERROR(Service_AM,
|
||||||
"NCA of type={} with title_id={:016X} is not found in the ContentProvider!",
|
"NCA of type={} with title_id={:016X} is not found in the ContentProvider!",
|
||||||
nca_type, title_id);
|
nca_type, title_id);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "core/hle/service/time/clock_types.h"
|
#include "core/hle/service/time/clock_types.h"
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/hle/service/time/clock_types.h"
|
#include "core/hle/service/time/clock_types.h"
|
||||||
|
|
||||||
|
|
|
@ -366,8 +366,6 @@ std::optional<IPv4Address> GetHostIPv4Address() {
|
||||||
if (res != network_interfaces.end()) {
|
if (res != network_interfaces.end()) {
|
||||||
char ip_addr[16] = {};
|
char ip_addr[16] = {};
|
||||||
ASSERT(inet_ntop(AF_INET, &res->ip_address, ip_addr, sizeof(ip_addr)) != nullptr);
|
ASSERT(inet_ntop(AF_INET, &res->ip_address, ip_addr, sizeof(ip_addr)) != nullptr);
|
||||||
LOG_INFO(Network, "IP address: {}", ip_addr);
|
|
||||||
|
|
||||||
return TranslateIPv4(res->ip_address);
|
return TranslateIPv4(res->ip_address);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Network, "Couldn't find selected interface \"{}\"", selected_network_interface);
|
LOG_ERROR(Network, "Couldn't find selected interface \"{}\"", selected_network_interface);
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common/bit_field.h"
|
#include "common/bit_field.h"
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "video_core/surface.h"
|
#include "video_core/surface.h"
|
||||||
#include "video_core/texture_cache/formatter.h"
|
#include "video_core/texture_cache/formatter.h"
|
||||||
#include "video_core/texture_cache/samples_helper.h"
|
#include "video_core/texture_cache/samples_helper.h"
|
||||||
|
#include "video_core/texture_cache/util.h"
|
||||||
|
|
||||||
namespace OpenGL {
|
namespace OpenGL {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "shader_recompiler/shader_info.h"
|
#include "shader_recompiler/shader_info.h"
|
||||||
#include "video_core/renderer_opengl/gl_resource_manager.h"
|
#include "video_core/renderer_opengl/gl_resource_manager.h"
|
||||||
#include "video_core/renderer_opengl/util_shaders.h"
|
#include "video_core/renderer_opengl/util_shaders.h"
|
||||||
|
#include "video_core/texture_cache/image_view_base.h"
|
||||||
#include "video_core/texture_cache/texture_cache_base.h"
|
#include "video_core/texture_cache/texture_cache_base.h"
|
||||||
|
|
||||||
namespace OpenGL {
|
namespace OpenGL {
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "video_core/renderer_vulkan/vk_texture_cache.h"
|
#include "video_core/renderer_vulkan/vk_texture_cache.h"
|
||||||
#include "video_core/texture_cache/formatter.h"
|
#include "video_core/texture_cache/formatter.h"
|
||||||
#include "video_core/texture_cache/samples_helper.h"
|
#include "video_core/texture_cache/samples_helper.h"
|
||||||
|
#include "video_core/texture_cache/util.h"
|
||||||
#include "video_core/vulkan_common/vulkan_device.h"
|
#include "video_core/vulkan_common/vulkan_device.h"
|
||||||
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
||||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <compare>
|
|
||||||
#include <span>
|
#include <span>
|
||||||
|
|
||||||
#include "shader_recompiler/shader_info.h"
|
#include "shader_recompiler/shader_info.h"
|
||||||
#include "video_core/renderer_vulkan/vk_staging_buffer_pool.h"
|
#include "video_core/renderer_vulkan/vk_staging_buffer_pool.h"
|
||||||
|
#include "video_core/texture_cache/image_view_base.h"
|
||||||
#include "video_core/texture_cache/texture_cache_base.h"
|
#include "video_core/texture_cache/texture_cache_base.h"
|
||||||
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
||||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "video_core/texture_cache/image_view_info.h"
|
#include "video_core/texture_cache/image_view_info.h"
|
||||||
#include "video_core/texture_cache/texture_cache_base.h"
|
#include "video_core/texture_cache/texture_cache_base.h"
|
||||||
#include "video_core/texture_cache/types.h"
|
#include "video_core/texture_cache/types.h"
|
||||||
|
#include "video_core/texture_cache/util.h"
|
||||||
#include "video_core/textures/texture.h"
|
#include "video_core/textures/texture.h"
|
||||||
|
|
||||||
namespace VideoCommon {
|
namespace VideoCommon {
|
||||||
|
|
|
@ -4,10 +4,15 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
#include "common/alignment.h"
|
#include "common/alignment.h"
|
||||||
#include "video_core/dirty_flags.h"
|
#include "video_core/dirty_flags.h"
|
||||||
|
#include "video_core/engines/kepler_compute.h"
|
||||||
|
#include "video_core/texture_cache/image_view_base.h"
|
||||||
#include "video_core/texture_cache/samples_helper.h"
|
#include "video_core/texture_cache/samples_helper.h"
|
||||||
#include "video_core/texture_cache/texture_cache_base.h"
|
#include "video_core/texture_cache/texture_cache_base.h"
|
||||||
|
#include "video_core/texture_cache/util.h"
|
||||||
|
|
||||||
namespace VideoCommon {
|
namespace VideoCommon {
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include <span>
|
#include <span>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
|
@ -18,10 +17,6 @@
|
||||||
#include "video_core/compatible_formats.h"
|
#include "video_core/compatible_formats.h"
|
||||||
#include "video_core/delayed_destruction_ring.h"
|
#include "video_core/delayed_destruction_ring.h"
|
||||||
#include "video_core/engines/fermi_2d.h"
|
#include "video_core/engines/fermi_2d.h"
|
||||||
#include "video_core/engines/kepler_compute.h"
|
|
||||||
#include "video_core/engines/maxwell_3d.h"
|
|
||||||
#include "video_core/memory_manager.h"
|
|
||||||
#include "video_core/rasterizer_interface.h"
|
|
||||||
#include "video_core/surface.h"
|
#include "video_core/surface.h"
|
||||||
#include "video_core/texture_cache/descriptor_table.h"
|
#include "video_core/texture_cache/descriptor_table.h"
|
||||||
#include "video_core/texture_cache/image_base.h"
|
#include "video_core/texture_cache/image_base.h"
|
||||||
|
@ -30,7 +25,6 @@
|
||||||
#include "video_core/texture_cache/render_targets.h"
|
#include "video_core/texture_cache/render_targets.h"
|
||||||
#include "video_core/texture_cache/slot_vector.h"
|
#include "video_core/texture_cache/slot_vector.h"
|
||||||
#include "video_core/texture_cache/types.h"
|
#include "video_core/texture_cache/types.h"
|
||||||
#include "video_core/texture_cache/util.h"
|
|
||||||
#include "video_core/textures/texture.h"
|
#include "video_core/textures/texture.h"
|
||||||
|
|
||||||
namespace VideoCommon {
|
namespace VideoCommon {
|
||||||
|
|
|
@ -18,6 +18,7 @@ ConfigureTasDialog::ConfigureTasDialog(QWidget* parent)
|
||||||
|
|
||||||
setFocusPolicy(Qt::ClickFocus);
|
setFocusPolicy(Qt::ClickFocus);
|
||||||
setWindowTitle(tr("TAS Configuration"));
|
setWindowTitle(tr("TAS Configuration"));
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
|
||||||
connect(ui->tas_path_button, &QToolButton::pressed, this,
|
connect(ui->tas_path_button, &QToolButton::pressed, this,
|
||||||
[this] { SetDirectory(DirectoryTarget::TAS, ui->tas_path_edit); });
|
[this] { SetDirectory(DirectoryTarget::TAS, ui->tas_path_edit); });
|
||||||
|
|
|
@ -1,153 +1,194 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>ConfigureTas</class>
|
<class>ConfigureTas</class>
|
||||||
<widget class="QDialog" name="ConfigureTas">
|
<widget class="QDialog" name="ConfigureTas">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_1">
|
<property name="geometry">
|
||||||
<item>
|
<rect>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
<x>0</x>
|
||||||
<item>
|
<y>0</y>
|
||||||
<widget class="QGroupBox" name="groupBox_1">
|
<width>337</width>
|
||||||
<property name="title">
|
<height>316</height>
|
||||||
<string>TAS</string>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_1">
|
<layout class="QVBoxLayout" name="verticalLayout_1">
|
||||||
<item row="0" column="0" colspan="4">
|
<item>
|
||||||
<widget class="QLabel" name="label_1">
|
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Reads controller input from scripts in the same format as TAS-nx scripts.<br/>For a more detailed explanation please consult the FAQ on the yuzu website.</string>
|
<widget class="QGroupBox" name="groupBox_1">
|
||||||
</property>
|
<property name="title">
|
||||||
</widget>
|
<string>TAS</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="1" column="0" colspan="4">
|
<layout class="QGridLayout" name="gridLayout_1">
|
||||||
<widget class="QLabel" name="label_2">
|
<item row="0" column="0" colspan="4">
|
||||||
<property name="text">
|
<widget class="QLabel" name="label_1">
|
||||||
<string>To check which hotkeys control the playback/recording, please refer to the Hotkey settings (General -> Hotkeys).</string>
|
<property name="text">
|
||||||
</property>
|
<string>Reads controller input from scripts in the same format as TAS-nx scripts.<br/>For a more detailed explanation please consult the FAQ on the yuzu website.</string>
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="4">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>WARNING: This is an experimental feature.<br/>It will not play back scripts frame perfectly with the current, imperfect syncing method.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0" colspan="4">
|
|
||||||
<widget class="QCheckBox" name="tas_enable">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable TAS features</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="4">
|
|
||||||
<widget class="QCheckBox" name="tas_control_swap">
|
|
||||||
<property name="text">
|
|
||||||
<string>Automatic controller profile swapping</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="4">
|
|
||||||
<widget class="QCheckBox" name="tas_loop_script">
|
|
||||||
<property name="text">
|
|
||||||
<string>Loop script</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="4">
|
|
||||||
<widget class="QCheckBox" name="tas_pause_on_load">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Pause execution during loads</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
|
||||||
<property name="title">
|
|
||||||
<string>Script Directory</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Path</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QToolButton" name="tas_path_button">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLineEdit" name="tas_path_edit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="orientation">
|
</widget>
|
||||||
<enum>Qt::Horizontal</enum>
|
</item>
|
||||||
|
<item row="1" column="0" colspan="4">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>To check which hotkeys control the playback/recording, please refer to the Hotkey settings (General -> Hotkeys).</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="wordWrap">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0" colspan="4">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>WARNING: This is an experimental feature.<br/>It will not play back scripts frame perfectly with the current, imperfect syncing method.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
<resources/>
|
<item>
|
||||||
<connections>
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<connection>
|
<item>
|
||||||
<sender>buttonBox</sender>
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<signal>accepted()</signal>
|
<property name="title">
|
||||||
<receiver>ConfigureTas</receiver>
|
<string>Settings</string>
|
||||||
<slot>accept()</slot>
|
</property>
|
||||||
</connection>
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<connection>
|
<item row="0" column="0" colspan="4">
|
||||||
<sender>buttonBox</sender>
|
<widget class="QCheckBox" name="tas_enable">
|
||||||
<signal>rejected()</signal>
|
<property name="text">
|
||||||
<receiver>ConfigureTas</receiver>
|
<string>Enable TAS features</string>
|
||||||
<slot>reject()</slot>
|
</property>
|
||||||
</connection>
|
</widget>
|
||||||
</connections>
|
</item>
|
||||||
|
<item row="1" column="0" colspan="4">
|
||||||
|
<widget class="QCheckBox" name="tas_control_swap">
|
||||||
|
<property name="text">
|
||||||
|
<string>Automatic controller profile swapping</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="4">
|
||||||
|
<widget class="QCheckBox" name="tas_loop_script">
|
||||||
|
<property name="text">
|
||||||
|
<string>Loop script</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="4">
|
||||||
|
<widget class="QCheckBox" name="tas_pause_on_load">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Pause execution during loads</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>Script Directory</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Path</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QToolButton" name="tas_path_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLineEdit" name="tas_path_edit"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>ConfigureTas</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>ConfigureTas</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -59,6 +59,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
#include <QScreen>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -2920,8 +2921,13 @@ void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_vie
|
||||||
if (title_name.empty()) {
|
if (title_name.empty()) {
|
||||||
setWindowTitle(QString::fromStdString(window_title));
|
setWindowTitle(QString::fromStdString(window_title));
|
||||||
} else {
|
} else {
|
||||||
const auto run_title =
|
const auto run_title = [window_title, title_name, title_version, gpu_vendor]() {
|
||||||
fmt::format("{} | {} | {} | {}", window_title, title_name, title_version, gpu_vendor);
|
if (title_version.empty()) {
|
||||||
|
return fmt::format("{} | {} | {}", window_title, title_name, gpu_vendor);
|
||||||
|
}
|
||||||
|
return fmt::format("{} | {} | {} | {}", window_title, title_name, title_version,
|
||||||
|
gpu_vendor);
|
||||||
|
}();
|
||||||
setWindowTitle(QString::fromStdString(run_title));
|
setWindowTitle(QString::fromStdString(run_title));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3452,6 +3458,41 @@ void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
|
||||||
#undef main
|
#undef main
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void SetHighDPIAttributes(int argc, char* argv[]) {
|
||||||
|
// Create a temporary QApplication as a workaround to get the current screen geometry.
|
||||||
|
QApplication* temp_app = new QApplication(argc, argv);
|
||||||
|
|
||||||
|
const QScreen* primary_screen = temp_app->primaryScreen();
|
||||||
|
const QRect screen_rect = primary_screen->geometry();
|
||||||
|
const int real_width = screen_rect.width();
|
||||||
|
const int real_height = screen_rect.height();
|
||||||
|
const float real_ratio = primary_screen->logicalDotsPerInch() / 96.0f;
|
||||||
|
|
||||||
|
delete temp_app;
|
||||||
|
|
||||||
|
// Recommended minimum width and height for proper window fit.
|
||||||
|
// Any screen with a lower resolution than this will still have a scale of 1.
|
||||||
|
constexpr float minimum_width = 1350.0f;
|
||||||
|
constexpr float minimum_height = 900.0f;
|
||||||
|
|
||||||
|
const float width_ratio = std::max(1.0f, real_width / minimum_width);
|
||||||
|
const float height_ratio = std::max(1.0f, real_height / minimum_height);
|
||||||
|
|
||||||
|
// Get the lower of the 2 ratios and truncate, this is the maximum integer scale.
|
||||||
|
const float max_ratio = std::trunc(std::min(width_ratio, height_ratio));
|
||||||
|
|
||||||
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
|
||||||
|
if (max_ratio > real_ratio) {
|
||||||
|
QApplication::setHighDpiScaleFactorRoundingPolicy(
|
||||||
|
Qt::HighDpiScaleFactorRoundingPolicy::Round);
|
||||||
|
} else {
|
||||||
|
QApplication::setHighDpiScaleFactorRoundingPolicy(
|
||||||
|
Qt::HighDpiScaleFactorRoundingPolicy::Floor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
Common::DetachedTasks detached_tasks;
|
Common::DetachedTasks detached_tasks;
|
||||||
MicroProfileOnThreadCreate("Frontend");
|
MicroProfileOnThreadCreate("Frontend");
|
||||||
|
@ -3484,8 +3525,11 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SetHighDPIAttributes(argc, argv);
|
||||||
|
|
||||||
// Enables the core to make the qt created contexts current on std::threads
|
// Enables the core to make the qt created contexts current on std::threads
|
||||||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
// Qt changes the locale and causes issues in float conversion using std::to_string() when
|
// Qt changes the locale and causes issues in float conversion using std::to_string() when
|
||||||
|
|
Loading…
Reference in a new issue