early-access version 3170

This commit is contained in:
pineappleEA 2022-11-30 18:07:45 +01:00
parent bc8c8445f6
commit 16cad67595
19 changed files with 33 additions and 99 deletions

View File

@ -67,10 +67,6 @@ elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "")
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
if (MINGW)
message(WARNING "MINGW has compilation errors with Precompiled Headers. Disabling PCH")
set(YUZU_USE_PRECOMPILED_HEADERS OFF)
endif()
if (MSVC AND CCACHE)
# buildcache does not properly cache PCH files, leading to compilation errors.
# See https://github.com/mbitsnbites/buildcache/discussions/230

View File

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

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -266,14 +266,16 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz
}
void SinkStream::Stall() {
if (IsStalled()) {
std::scoped_lock lk{stall_guard};
if (stalled_lock) {
return;
}
stalled_lock = system.StallProcesses();
}
void SinkStream::Unstall() {
if (!IsStalled()) {
std::scoped_lock lk{stall_guard};
if (!stalled_lock) {
return;
}
system.UnstallProcesses();

View File

@ -210,11 +210,6 @@ public:
*/
void Unstall();
private:
[[nodiscard]] bool IsStalled() const {
return stalled_lock.owns_lock();
}
protected:
/// Core system
Core::System& system;
@ -246,7 +241,7 @@ private:
f32 system_volume{1.0f};
/// Set via IAudioDevice service calls
f32 device_volume{1.0f};
/// True if coretiming has been stalled
std::mutex stall_guard;
std::unique_lock<std::mutex> stalled_lock;
};

View File

@ -37,6 +37,7 @@ add_library(common STATIC
cache_management.cpp
cache_management.h
common_funcs.h
common_headers.h
common_types.h
concepts.h
div_ceil.h
@ -187,5 +188,4 @@ endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(common PRIVATE precompiled_headers.h)
set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON)
endif()

12
src/common/common_headers.h Executable file
View File

@ -0,0 +1,12 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -141,7 +141,7 @@ static std::wstring CPToUTF16(u32 code_page, const std::string& input) {
MultiByteToWideChar(code_page, 0, input.data(), static_cast<int>(input.size()), nullptr, 0);
if (size == 0) {
return L"";
return std::wstring(size, L'\0');
}
std::wstring output(size, L'\0');
@ -158,7 +158,7 @@ std::string UTF16ToUTF8(const std::wstring& input) {
const auto size = WideCharToMultiByte(CP_UTF8, 0, input.data(), static_cast<int>(input.size()),
nullptr, 0, nullptr, nullptr);
if (size == 0) {
return "";
return std::string(size, '\0');
}
std::string output(size, '\0');

View File

@ -3,12 +3,7 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <boost/container/flat_map.hpp> // used by service.h which is heavily included
#include <boost/intrusive/rbtree.hpp> // used by k_auto_object.h which is heavily included
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,11 +3,5 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"
#include "frontend/maxwell/translate/impl/impl.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"

View File

@ -3,10 +3,4 @@
#pragma once
#include <algorithm>
#include <chrono>
#include <memory>
#include <fmt/format.h>
#include "common/assert.h"
#include "common/common_headers.h"