early-access version 2051

This commit is contained in:
pineappleEA 2021-09-12 23:31:31 +02:00
parent 6e6f8c29a2
commit f8da99d212
3 changed files with 23 additions and 20 deletions

View File

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

View File

@ -97,14 +97,19 @@ ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) cons
ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) const {
std::string path(Common::FS::SanitizePath(path_));
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
if (dir == nullptr || Common::FS::GetFilename(Common::FS::GetParentPath(path)).empty()) {
dir = backing;
}
auto new_dir = dir->CreateSubdirectory(Common::FS::GetFilename(path));
if (new_dir == nullptr) {
// TODO(DarkLordZach): Find a better error code for this
return ResultUnknown;
const auto components = Common::FS::SplitPathComponents(path);
std::string relative_path;
for (const auto& component : components) {
// Skip empty path components
if (component.empty()) {
continue;
}
relative_path = Common::FS::SanitizePath(relative_path + '/' + component);
auto new_dir = backing->CreateSubdirectory(relative_path);
if (new_dir == nullptr) {
// TODO(DarkLordZach): Find a better error code for this
return ResultUnknown;
}
}
return ResultSuccess;
}

View File

@ -3240,12 +3240,11 @@ std::optional<u64> GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProv
}
bool GMainWindow::ConfirmClose() {
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing)
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) {
return true;
QMessageBox::StandardButton answer =
QMessageBox::question(this, tr("yuzu"), tr("Are you sure you want to close yuzu?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
}
const auto text = tr("Are you sure you want to close yuzu?");
const auto answer = QMessageBox::question(this, tr("yuzu"), text);
return answer != QMessageBox::No;
}
@ -3327,14 +3326,13 @@ bool GMainWindow::ConfirmChangeGame() {
}
bool GMainWindow::ConfirmForceLockedExit() {
if (emu_thread == nullptr)
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) {
return true;
}
const auto text = tr("The currently running application has requested yuzu to not exit.\n\n"
"Would you like to bypass this and exit anyway?");
const auto answer =
QMessageBox::question(this, tr("yuzu"),
tr("The currently running application has requested yuzu to not "
"exit.\n\nWould you like to bypass this and exit anyway?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
const auto answer = QMessageBox::question(this, tr("yuzu"), text);
return answer != QMessageBox::No;
}