Skip to content

Commit

Permalink
Rebase to latest develop. Remove redundant window backend stuff that …
Browse files Browse the repository at this point in the history
…exists now in BenMenuBar.
  • Loading branch information
Malkierian committed Jul 16, 2024
1 parent 591045f commit 304f0b4
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions mm/2s2h/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,11 @@ extern std::shared_ptr<ActorViewerWindow> mActorViewerWindow;
extern std::shared_ptr<CollisionViewerWindow> mCollisionViewerWindow;
extern std::shared_ptr<EventLogWindow> mEventLogWindow;
extern std::shared_ptr<BenInputEditorWindow> mBenInputEditorWindow;
std::shared_ptr<std::vector<Ship::WindowBackend>> availableWindowBackends;
std::unordered_map<Ship::WindowBackend, const char*> availableWindowBackendsMap;
Ship::WindowBackend configWindowBackend;

void UpdateWindowBackendObjects() {
availableWindowBackends = Ship::Context::GetInstance()->GetWindow()->GetAvailableWindowBackends();
for (auto& backend : *availableWindowBackends) {
availableWindowBackendsMap[backend] = windowBackendsMap[backend];
}
extern std::shared_ptr<std::vector<Ship::WindowBackend>> availableWindowBackends;
extern std::unordered_map<Ship::WindowBackend, const char*> availableWindowBackendsMap;
extern Ship::WindowBackend configWindowBackend;

int32_t configWindowBackendId = Ship::Context::GetInstance()->GetConfig()->GetInt("Window.Backend.Id", -1);
Ship::WindowBackend runningWindowBackend = Ship::Context::GetInstance()->GetWindow()->GetWindowBackend();
if (Ship::Context::GetInstance()->GetWindow()->IsAvailableWindowBackend(configWindowBackendId)) {
configWindowBackend = static_cast<Ship::WindowBackend>(configWindowBackendId);
} else {
configWindowBackend = runningWindowBackend;
}
}
extern void UpdateWindowBackendObjects();

void DrawGeneralSettings() {
#if not defined(__SWITCH__) and not defined(__WIIU__)
Expand Down

0 comments on commit 304f0b4

Please sign in to comment.