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 yuzu emulator early access
============= =============
This is the source code for early-access 2049. This is the source code for early-access 2051.
## Legal Notice ## Legal Notice

View File

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

View File

@ -3240,12 +3240,11 @@ std::optional<u64> GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProv
} }
bool GMainWindow::ConfirmClose() { bool GMainWindow::ConfirmClose() {
if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) {
return true; return true;
}
QMessageBox::StandardButton answer = const auto text = tr("Are you sure you want to close yuzu?");
QMessageBox::question(this, tr("yuzu"), tr("Are you sure you want to close yuzu?"), const auto answer = QMessageBox::question(this, tr("yuzu"), text);
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
return answer != QMessageBox::No; return answer != QMessageBox::No;
} }
@ -3327,14 +3326,13 @@ bool GMainWindow::ConfirmChangeGame() {
} }
bool GMainWindow::ConfirmForceLockedExit() { bool GMainWindow::ConfirmForceLockedExit() {
if (emu_thread == nullptr) if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) {
return true; 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 = const auto answer = QMessageBox::question(this, tr("yuzu"), text);
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);
return answer != QMessageBox::No; return answer != QMessageBox::No;
} }