Merge commit '6bcd6deb76a946e5e4f58c865d12316b7dc4d2a6'
This commit is contained in:
3
deps/nostalgia/src/nostalgia/player/app.cpp
vendored
3
deps/nostalgia/src/nostalgia/player/app.cpp
vendored
@ -134,7 +134,6 @@ ox::Error run(
|
||||
return ox::Error{1, "Please provide path to project directory or OxFS file."};
|
||||
}
|
||||
auto const path = args[1];
|
||||
OX_REQUIRE_M(fs, keel::loadRomFs(path));
|
||||
OX_REQUIRE_M(tctx, turbine::init(std::move(fs), project));
|
||||
OX_REQUIRE_M(tctx, turbine::init(path, project));
|
||||
return runTileSheetSetTest(*tctx);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ constexpr auto makeLoader(Context &ctx) {
|
||||
if (!beginsWith(assetId, "/")) {
|
||||
auto const p = ctx.uuidToPath.at(assetId);
|
||||
if (p.error) {
|
||||
oxErrf("Could not find asset: {}", assetId);
|
||||
oxErrf("Could not find asset: {}\n", assetId);
|
||||
return ox::Error{1, "Asset ID not found"};
|
||||
}
|
||||
assetId = *p.value;
|
||||
|
@ -156,7 +156,7 @@ void StudioUI::draw() noexcept {
|
||||
void StudioUI::drawMenu() noexcept {
|
||||
if (ImGui::BeginMainMenuBar()) {
|
||||
if (ImGui::BeginMenu("File")) {
|
||||
if (ImGui::MenuItem("New...", "Ctrl+N")) {
|
||||
if (ImGui::MenuItem("New...", "Ctrl+N", false, m_project)) {
|
||||
m_newMenu.open();
|
||||
}
|
||||
if (ImGui::MenuItem("New Project...", "Ctrl+Shift+N")) {
|
||||
@ -254,6 +254,7 @@ void StudioUI::drawTabs() noexcept {
|
||||
if (!open) {
|
||||
if (e->unsavedChanges()) {
|
||||
m_closeFileConfirm.open();
|
||||
++it;
|
||||
} else {
|
||||
e->close();
|
||||
if (m_activeEditor == (*it).get()) {
|
||||
|
@ -84,10 +84,11 @@ ox::FileSystem &Project::romFs() noexcept {
|
||||
}
|
||||
|
||||
ox::Error Project::mkdir(ox::StringViewCR path) const noexcept {
|
||||
auto const [stat, err] = m_fs.stat(path);
|
||||
auto [stat, err] = m_fs.stat(path);
|
||||
if (err) {
|
||||
OX_RETURN_ERROR(m_fs.mkdir(path, true));
|
||||
dirAdded.emit(path);
|
||||
OX_RETURN_ERROR(m_fs.stat(path).moveTo(stat));
|
||||
}
|
||||
return stat.fileType == ox::FileType::Directory ?
|
||||
ox::Error{} : ox::Error{1, "path exists as normal file"};
|
||||
|
Reference in New Issue
Block a user