Skip to content

Commit

Permalink
Merge branch 'postprocessorhud' into 'master'
Browse files Browse the repository at this point in the history
Sort inactive shader list (#7652)

Closes #7652

See merge request OpenMW/openmw!3534
  • Loading branch information
AnyOldName3 committed Oct 30, 2023
2 parents 6d776ac + 3d5b06a commit d84caff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
Feature #7618: Show the player character's health in the save details
Feature #7625: Add some missing console error outputs
Feature #7634: Support NiParticleBomb
Feature #7652: Sort inactive post processing shaders list properly
Task #5896: Do not use deprecated MyGUI properties
Task #7113: Move from std::atoi to std::from_char
Task #7117: Replace boost::scoped_array with std::vector
Expand Down
6 changes: 6 additions & 0 deletions apps/openmw/mwgui/postprocessorhud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <components/fx/technique.hpp>
#include <components/fx/widgets.hpp>

#include <components/misc/strings/algorithm.hpp>
#include <components/misc/utf8stream.hpp>

#include <components/widgets/box.hpp>
Expand Down Expand Up @@ -421,7 +422,12 @@ namespace MWGui

auto* processor = MWBase::Environment::get().getWorld()->getPostProcessor();

std::vector<std::string> techniques;
for (const auto& [name, _] : processor->getTechniqueMap())
techniques.push_back(name);
std::sort(techniques.begin(), techniques.end(), Misc::StringUtils::ciLess);

for (const std::string& name : techniques)
{
auto technique = processor->loadTechnique(name);

Expand Down

0 comments on commit d84caff

Please sign in to comment.