Compare commits

...

5 Commits

Author SHA1 Message Date
cass_058 e1716384a0 Merge branch suyu:dev into dev 2024-03-08 01:18:16 +00:00
zqpvr 5db58434e5 Update settings.cpp 2024-03-08 00:40:12 +00:00
zqpvr 664e77b4d8 Update configure.ui 2024-03-08 00:23:54 +00:00
cass_058 abb224fe1d Merge branch suyu:dev into dev 2024-03-08 00:22:56 +00:00
Paulo Alfaiate 51862e862d Removed RomFSRawCopy + VfsDirectoryCreateFileWrapper obsolete functions 2024-03-07 22:39:17 +00:00
4 changed files with 3 additions and 73 deletions

View File

@ -114,7 +114,7 @@ void LogSettings() {
LOG_INFO(Config, "{}: {}", name, Common::FS::PathToUTF8String(path));
};
LOG_INFO(Config, "yuzu Configuration:");
LOG_INFO(Config, "suyu Configuration:");
for (auto& [category, settings] : values.linkage.by_category) {
for (const auto& setting : settings) {
if (setting->Id() == values.yuzu_token.Id()) {

View File

@ -612,7 +612,7 @@ struct Values {
// WebService
Setting<bool> enable_telemetry{linkage, false, "enable_telemetry", Category::WebService};
Setting<std::string> web_api_url{linkage, "https://api.yuzu-emu.org", "web_api_url",
Setting<std::string> web_api_url{linkage, "https://api.suyu.dev", "web_api_url",
Category::WebService};
Setting<std::string> yuzu_username{linkage, std::string(), "yuzu_username",
Category::WebService};

View File

@ -17,7 +17,7 @@
</size>
</property>
<property name="windowTitle">
<string>yuzu Configuration</string>
<string>suyu Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -54,14 +54,6 @@
#include "yuzu/multiplayer/state.h"
#include "yuzu/util/controller_navigation.h"
// These are wrappers to avoid the calls to CreateFile because of the Windows
// defines.
static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::VirtualDir& dir,
const std::string& path) {
return dir->CreateFile(path);
}
#include <fmt/ostream.h>
#include <glad/glad.h>
@ -2374,68 +2366,6 @@ void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) {
QDesktopServices::openUrl(QUrl::fromLocalFile(qt_shader_cache_path));
}
static bool RomFSRawCopy(size_t total_size, size_t& read_size, QProgressDialog& dialog,
const FileSys::VirtualDir& src, const FileSys::VirtualDir& dest,
bool full) {
if (src == nullptr || dest == nullptr || !src->IsReadable() || !dest->IsWritable())
return false;
if (dialog.wasCanceled())
return false;
std::vector<u8> buffer(CopyBufferSize);
auto last_timestamp = std::chrono::steady_clock::now();
const auto QtRawCopy = [&](const FileSys::VirtualFile& src_file,
const FileSys::VirtualFile& dest_file) {
if (src_file == nullptr || dest_file == nullptr) {
return false;
}
if (!dest_file->Resize(src_file->GetSize())) {
return false;
}
for (std::size_t i = 0; i < src_file->GetSize(); i += buffer.size()) {
if (dialog.wasCanceled()) {
dest_file->Resize(0);
return false;
}
using namespace std::literals::chrono_literals;
const auto new_timestamp = std::chrono::steady_clock::now();
if ((new_timestamp - last_timestamp) > 33ms) {
last_timestamp = new_timestamp;
dialog.setValue(
static_cast<int>(std::min(read_size, total_size) * 100 / total_size));
QCoreApplication::processEvents();
}
const auto read = src_file->Read(buffer.data(), buffer.size(), i);
dest_file->Write(buffer.data(), read, i);
read_size += read;
}
return true;
};
if (full) {
for (const auto& file : src->GetFiles()) {
const auto out = VfsDirectoryCreateFileWrapper(dest, file->GetName());
if (!QtRawCopy(file, out))
return false;
}
}
for (const auto& dir : src->GetSubdirectories()) {
const auto out = dest->CreateSubdirectory(dir->GetName());
if (!RomFSRawCopy(total_size, read_size, dialog, dir, out, full))
return false;
}
return true;
}
QString GMainWindow::GetGameListErrorRemoving(InstalledEntryType type) const {
switch (type) {
case InstalledEntryType::Game: