Restore direct-installation Classic baseline for OpenBMH 1.0 (by Codex)
This commit is contained in:
1 parent
c8f04d0099
commit
c3704878d6
255 files changed
+311
-21131
No files matched your search
+6
-11
@@ -1,5 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
#include "formats/content.hpp"
|
||||
#include "formats/executable_layout.hpp"
|
||||
#include "app/controller.hpp"
|
||||
#include "app/window_actions.hpp"
|
||||
@@ -352,8 +351,8 @@ void start_original_desk_audio(openbmh::audio::Playback& playback, const GameSta
|
||||
original_audio_command(playback, 1); // SavePathInDirectory / CareerFirstSteps2, resume the same song.
|
||||
}
|
||||
|
||||
bool save_path_in_directory(const fs::path &path, const fs::path &directory,
|
||||
std::string_view expected_extension) {
|
||||
bool save_path_in_directory(const fs::path& path, const fs::path& directory,
|
||||
std::string_view expected_extension = ".fbm") {
|
||||
if (path.filename().empty()) return false;
|
||||
std::string ext = path.extension().string();
|
||||
std::transform(ext.begin(), ext.end(), ext.begin(), [](unsigned char c) { return char(std::tolower(c)); });
|
||||
@@ -980,8 +979,7 @@ std::string serve_flow_request(ui::StartupFlow& flow, const ui::FlowResult& resu
|
||||
page.highscore.rows={};
|
||||
if(page.highscore.ranked) {
|
||||
auto texts=load_textd(ui::asset_path(data,"TEXTD.BLK"));
|
||||
const auto file = highscore_file(save_directory, page.highscore.signature,
|
||||
texts.strings.at(889), bool(content::find(data)));
|
||||
const auto file=highscore_file(save_directory,page.highscore.signature,texts.strings.at(889));
|
||||
HighscoreTable rows{};
|
||||
if(fs::exists(file))rows=load_highscore_table(file);
|
||||
page.highscore=make_highscore_projection(game,std::move(rows),HighscoreContext::ActiveManager);
|
||||
@@ -1878,8 +1876,7 @@ std::string serve_flow_request(ui::StartupFlow& flow, const ui::FlowResult& resu
|
||||
result.settings_owner_sequence == flow.settings_owner_sequence() &&
|
||||
request.origin_item_id == desk_owner.item_id && request.manager_slot == desk_owner.manager_slot;
|
||||
if (!session || !same_pending || request.revision != revision ||
|
||||
!save_path_in_directory(request.path, save_directory,
|
||||
content::find(data) ? ".obsettings" : ".ein")) {
|
||||
!save_path_in_directory(request.path, save_directory, ".ein")) {
|
||||
flow.reject_settings_file("stale_request_or_invalid_settings_path");
|
||||
return {};
|
||||
}
|
||||
@@ -1910,8 +1907,7 @@ std::string serve_flow_request(ui::StartupFlow& flow, const ui::FlowResult& resu
|
||||
return {};
|
||||
}
|
||||
if (request.revision != revision ||
|
||||
!save_path_in_directory(request.path, save_directory,
|
||||
content::find(data) ? ".oblayout" : ".men")) {
|
||||
!save_path_in_directory(request.path, save_directory, ".men")) {
|
||||
flow.reject_file_action("stale_request_or_invalid_menu_layout_path");
|
||||
return {};
|
||||
}
|
||||
@@ -1929,8 +1925,7 @@ std::string serve_flow_request(ui::StartupFlow& flow, const ui::FlowResult& resu
|
||||
}
|
||||
} else if (result.request == ui::FlowRequest::file_action) {
|
||||
const auto& request = result.file_action;
|
||||
if (request.revision != revision ||
|
||||
!save_path_in_directory(request.path, save_directory, content::find(data) ? ".obs" : ".fbm")) {
|
||||
if (request.revision != revision || !save_path_in_directory(request.path, save_directory)) {
|
||||
flow.reject_file_action("stale_request_or_invalid_save_path");
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user