early-access version 2104
This commit is contained in:
		@@ -237,7 +237,7 @@ yuzu_find_packages()
 | 
			
		||||
 | 
			
		||||
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
 | 
			
		||||
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
 | 
			
		||||
    # Qt5Config inside the root folder instead of the conan generated one.
 | 
			
		||||
    if(EXISTS ${CMAKE_BINARY_DIR}/qtConfig.cmake)
 | 
			
		||||
@@ -339,8 +339,8 @@ if(ENABLE_QT)
 | 
			
		||||
    set(QT_PREFIX_HINT)
 | 
			
		||||
 | 
			
		||||
    if(YUZU_USE_BUNDLED_QT)
 | 
			
		||||
        if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) AND ARCHITECTURE_x86_64)
 | 
			
		||||
            set(QT_BUILD qt-5.12.8-msvc2017_64)
 | 
			
		||||
        if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
 | 
			
		||||
            set(QT_BUILD qt-5.15.2-msvc2019_64)
 | 
			
		||||
        elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64)
 | 
			
		||||
            set(QT_BUILD qt5_5_15_2)
 | 
			
		||||
        else()
 | 
			
		||||
@@ -369,7 +369,7 @@ endif()
 | 
			
		||||
if (ENABLE_SDL2)
 | 
			
		||||
    if (YUZU_USE_BUNDLED_SDL2)
 | 
			
		||||
        # 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")
 | 
			
		||||
        else()
 | 
			
		||||
            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)
 | 
			
		||||
        list(APPEND CMAKE_MODULE_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)
 | 
			
		||||
            find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
 | 
			
		||||
        endif()
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ function(copy_yuzu_Qt5_deps target_dir)
 | 
			
		||||
                Qt5Positioning$<$<CONFIG:Debug>:d>.*
 | 
			
		||||
                Qt5PrintSupport$<$<CONFIG:Debug>:d>.*
 | 
			
		||||
                Qt5Qml$<$<CONFIG:Debug>:d>.*
 | 
			
		||||
                Qt5QmlModels$<$<CONFIG:Debug>:d>.*
 | 
			
		||||
                Qt5Quick$<$<CONFIG:Debug>:d>.*
 | 
			
		||||
                Qt5QuickWidgets$<$<CONFIG:Debug>:d>.*
 | 
			
		||||
                Qt5WebChannel$<$<CONFIG:Debug>:d>.*
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
yuzu emulator early access
 | 
			
		||||
=============
 | 
			
		||||
 | 
			
		||||
This is the source code for early-access 2101.
 | 
			
		||||
This is the source code for early-access 2104.
 | 
			
		||||
 | 
			
		||||
## Legal Notice
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,13 +2,16 @@
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include <cmath>
 | 
			
		||||
#include <numbers>
 | 
			
		||||
 | 
			
		||||
#include "audio_core/algorithm/interpolate.h"
 | 
			
		||||
#include "audio_core/command_generator.h"
 | 
			
		||||
#include "audio_core/effect_context.h"
 | 
			
		||||
#include "audio_core/mix_context.h"
 | 
			
		||||
#include "audio_core/voice_context.h"
 | 
			
		||||
#include "common/common_types.h"
 | 
			
		||||
#include "core/memory.h"
 | 
			
		||||
 | 
			
		||||
namespace AudioCore {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,8 @@
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
 | 
			
		||||
#include "audio_core/behavior_info.h"
 | 
			
		||||
#include "audio_core/common.h"
 | 
			
		||||
#include "audio_core/effect_context.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,8 @@
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
 | 
			
		||||
#include "audio_core/behavior_info.h"
 | 
			
		||||
#include "audio_core/voice_context.h"
 | 
			
		||||
#include "core/memory.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -79,6 +79,7 @@ add_library(common STATIC
 | 
			
		||||
    logging/filter.cpp
 | 
			
		||||
    logging/filter.h
 | 
			
		||||
    logging/log.h
 | 
			
		||||
    logging/log_entry.h
 | 
			
		||||
    logging/text_formatter.cpp
 | 
			
		||||
    logging/text_formatter.h
 | 
			
		||||
    logging/types.h
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,8 @@
 | 
			
		||||
#include <thread>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
#include <fmt/format.h>
 | 
			
		||||
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <windows.h> // For OutputDebugStringW
 | 
			
		||||
#endif
 | 
			
		||||
@@ -22,6 +24,7 @@
 | 
			
		||||
 | 
			
		||||
#include "common/logging/backend.h"
 | 
			
		||||
#include "common/logging/log.h"
 | 
			
		||||
#include "common/logging/log_entry.h"
 | 
			
		||||
#include "common/logging/text_formatter.h"
 | 
			
		||||
#include "common/settings.h"
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,11 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <fmt/format.h>
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include <string_view>
 | 
			
		||||
 | 
			
		||||
#include <fmt/core.h>
 | 
			
		||||
 | 
			
		||||
#include "common/logging/types.h"
 | 
			
		||||
 | 
			
		||||
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/logging/filter.h"
 | 
			
		||||
#include "common/logging/log.h"
 | 
			
		||||
#include "common/logging/log_entry.h"
 | 
			
		||||
#include "common/logging/text_formatter.h"
 | 
			
		||||
#include "common/string_util.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,6 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <chrono>
 | 
			
		||||
 | 
			
		||||
#include "common/common_types.h"
 | 
			
		||||
 | 
			
		||||
namespace Common::Log {
 | 
			
		||||
@@ -131,19 +129,4 @@ enum class Class : u8 {
 | 
			
		||||
    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
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#include <array>
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
#include <utility>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,8 @@
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
 | 
			
		||||
#include "core/hle/kernel/k_auto_object_container.h"
 | 
			
		||||
 | 
			
		||||
namespace Kernel {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,7 @@
 | 
			
		||||
#include "core/hle/service/am/applets/applet_web_browser.h"
 | 
			
		||||
#include "core/hle/service/filesystem/filesystem.h"
 | 
			
		||||
#include "core/hle/service/ns/pl_u.h"
 | 
			
		||||
#include "core/loader/loader.h"
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
 | 
			
		||||
        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,
 | 
			
		||||
                      "NCA of type={} with title_id={:016X} is not found in the ContentProvider!",
 | 
			
		||||
                      nca_type, title_id);
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#include <cmath>
 | 
			
		||||
#include <memory>
 | 
			
		||||
 | 
			
		||||
#include "common/logging/log.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,7 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
#include "core/hle/service/time/clock_types.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,8 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <memory>
 | 
			
		||||
 | 
			
		||||
#include "common/common_types.h"
 | 
			
		||||
#include "core/hle/service/time/clock_types.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -366,8 +366,6 @@ std::optional<IPv4Address> GetHostIPv4Address() {
 | 
			
		||||
    if (res != network_interfaces.end()) {
 | 
			
		||||
        char ip_addr[16] = {};
 | 
			
		||||
        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);
 | 
			
		||||
    } else {
 | 
			
		||||
        LOG_ERROR(Network, "Couldn't find selected interface \"{}\"", selected_network_interface);
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <memory>
 | 
			
		||||
 | 
			
		||||
#include "common/bit_field.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -20,6 +20,7 @@
 | 
			
		||||
#include "video_core/surface.h"
 | 
			
		||||
#include "video_core/texture_cache/formatter.h"
 | 
			
		||||
#include "video_core/texture_cache/samples_helper.h"
 | 
			
		||||
#include "video_core/texture_cache/util.h"
 | 
			
		||||
 | 
			
		||||
namespace OpenGL {
 | 
			
		||||
namespace {
 | 
			
		||||
 
 | 
			
		||||
@@ -12,6 +12,7 @@
 | 
			
		||||
#include "shader_recompiler/shader_info.h"
 | 
			
		||||
#include "video_core/renderer_opengl/gl_resource_manager.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"
 | 
			
		||||
 | 
			
		||||
namespace OpenGL {
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@
 | 
			
		||||
#include "video_core/renderer_vulkan/vk_texture_cache.h"
 | 
			
		||||
#include "video_core/texture_cache/formatter.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_memory_allocator.h"
 | 
			
		||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -4,11 +4,11 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <compare>
 | 
			
		||||
#include <span>
 | 
			
		||||
 | 
			
		||||
#include "shader_recompiler/shader_info.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/vulkan_common/vulkan_memory_allocator.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/texture_cache_base.h"
 | 
			
		||||
#include "video_core/texture_cache/types.h"
 | 
			
		||||
#include "video_core/texture_cache/util.h"
 | 
			
		||||
#include "video_core/textures/texture.h"
 | 
			
		||||
 | 
			
		||||
namespace VideoCommon {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,10 +4,15 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <unordered_set>
 | 
			
		||||
 | 
			
		||||
#include "common/alignment.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/texture_cache_base.h"
 | 
			
		||||
#include "video_core/texture_cache/util.h"
 | 
			
		||||
 | 
			
		||||
namespace VideoCommon {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,6 @@
 | 
			
		||||
#include <span>
 | 
			
		||||
#include <type_traits>
 | 
			
		||||
#include <unordered_map>
 | 
			
		||||
#include <unordered_set>
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include <queue>
 | 
			
		||||
 | 
			
		||||
@@ -18,10 +17,6 @@
 | 
			
		||||
#include "video_core/compatible_formats.h"
 | 
			
		||||
#include "video_core/delayed_destruction_ring.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/texture_cache/descriptor_table.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/slot_vector.h"
 | 
			
		||||
#include "video_core/texture_cache/types.h"
 | 
			
		||||
#include "video_core/texture_cache/util.h"
 | 
			
		||||
#include "video_core/textures/texture.h"
 | 
			
		||||
 | 
			
		||||
namespace VideoCommon {
 | 
			
		||||
 
 | 
			
		||||
@@ -18,6 +18,7 @@ ConfigureTasDialog::ConfigureTasDialog(QWidget* parent)
 | 
			
		||||
 | 
			
		||||
    setFocusPolicy(Qt::ClickFocus);
 | 
			
		||||
    setWindowTitle(tr("TAS Configuration"));
 | 
			
		||||
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
 | 
			
		||||
 | 
			
		||||
    connect(ui->tas_path_button, &QToolButton::pressed, this,
 | 
			
		||||
            [this] { SetDirectory(DirectoryTarget::TAS, ui->tas_path_edit); });
 | 
			
		||||
 
 | 
			
		||||
@@ -1,153 +1,194 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
  <class>ConfigureTas</class>
 | 
			
		||||
  <widget class="QDialog" name="ConfigureTas">
 | 
			
		||||
    <layout class="QVBoxLayout" name="verticalLayout_1">
 | 
			
		||||
      <item>
 | 
			
		||||
        <layout class="QHBoxLayout" name="horizontalLayout_1">
 | 
			
		||||
          <item>
 | 
			
		||||
            <widget class="QGroupBox" name="groupBox_1">
 | 
			
		||||
              <property name="title">
 | 
			
		||||
                <string>TAS</string>
 | 
			
		||||
              </property>
 | 
			
		||||
              <layout class="QGridLayout" name="gridLayout_1">
 | 
			
		||||
                <item row="0" column="0" colspan="4">
 | 
			
		||||
                  <widget class="QLabel" name="label_1">
 | 
			
		||||
                    <property name="text">
 | 
			
		||||
                      <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>
 | 
			
		||||
                  </widget>
 | 
			
		||||
                </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 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>
 | 
			
		||||
 <class>ConfigureTas</class>
 | 
			
		||||
 <widget class="QDialog" name="ConfigureTas">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>337</width>
 | 
			
		||||
    <height>316</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <layout class="QVBoxLayout" name="verticalLayout_1">
 | 
			
		||||
   <item>
 | 
			
		||||
    <layout class="QHBoxLayout" name="horizontalLayout_1">
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QGroupBox" name="groupBox_1">
 | 
			
		||||
       <property name="title">
 | 
			
		||||
        <string>TAS</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <layout class="QGridLayout" name="gridLayout_1">
 | 
			
		||||
        <item row="0" column="0" colspan="4">
 | 
			
		||||
         <widget class="QLabel" name="label_1">
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <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>
 | 
			
		||||
          <property name="orientation">
 | 
			
		||||
            <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </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 name="standardButtons">
 | 
			
		||||
            <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
 | 
			
		||||
          <property name="wordWrap">
 | 
			
		||||
           <bool>true</bool>
 | 
			
		||||
          </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
         </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>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <resources/>
 | 
			
		||||
  <connections>
 | 
			
		||||
    <connection>
 | 
			
		||||
      <sender>buttonBox</sender>
 | 
			
		||||
      <signal>accepted()</signal>
 | 
			
		||||
      <receiver>ConfigureTas</receiver>
 | 
			
		||||
      <slot>accept()</slot>
 | 
			
		||||
    </connection>
 | 
			
		||||
    <connection>
 | 
			
		||||
      <sender>buttonBox</sender>
 | 
			
		||||
      <signal>rejected()</signal>
 | 
			
		||||
      <receiver>ConfigureTas</receiver>
 | 
			
		||||
      <slot>reject()</slot>
 | 
			
		||||
    </connection>
 | 
			
		||||
  </connections>
 | 
			
		||||
   </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>
 | 
			
		||||
    <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>
 | 
			
		||||
 
 | 
			
		||||
@@ -59,6 +59,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
 | 
			
		||||
#include <QProgressBar>
 | 
			
		||||
#include <QProgressDialog>
 | 
			
		||||
#include <QPushButton>
 | 
			
		||||
#include <QScreen>
 | 
			
		||||
#include <QShortcut>
 | 
			
		||||
#include <QStatusBar>
 | 
			
		||||
#include <QString>
 | 
			
		||||
@@ -2920,8 +2921,13 @@ void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_vie
 | 
			
		||||
    if (title_name.empty()) {
 | 
			
		||||
        setWindowTitle(QString::fromStdString(window_title));
 | 
			
		||||
    } else {
 | 
			
		||||
        const auto run_title =
 | 
			
		||||
            fmt::format("{} | {} | {} | {}", window_title, title_name, title_version, gpu_vendor);
 | 
			
		||||
        const auto run_title = [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));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -3452,6 +3458,41 @@ void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
 | 
			
		||||
#undef main
 | 
			
		||||
#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[]) {
 | 
			
		||||
    Common::DetachedTasks detached_tasks;
 | 
			
		||||
    MicroProfileOnThreadCreate("Frontend");
 | 
			
		||||
@@ -3484,8 +3525,11 @@ int main(int argc, char* argv[]) {
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    SetHighDPIAttributes(argc, argv);
 | 
			
		||||
 | 
			
		||||
    // Enables the core to make the qt created contexts current on std::threads
 | 
			
		||||
    QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
 | 
			
		||||
 | 
			
		||||
    QApplication app(argc, argv);
 | 
			
		||||
 | 
			
		||||
    // Qt changes the locale and causes issues in float conversion using std::to_string() when
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user