Skip to content

Commit

Permalink
vkconfig2: SDK 296 bugfixing
Browse files Browse the repository at this point in the history
- Fix renaming configuration with the same name but different cases
- Fix launch button saying Tarminate instead of launch
  • Loading branch information
christophe-lunarg committed Oct 1, 2024
1 parent b2b3234 commit c69d2e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions vkconfig/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Fix flag settings dependencies
- Fix filesystem settings update
- Fix overridden implicit layer ordering
- Fix renaming configuration with the same name but different cases

## [Vulkan Configurator 2.6.1](https://github.com/LunarG/VulkanTools/tree/vulkan-sdk-1.3.290.0) - July 2024

Expand Down
1 change: 0 additions & 1 deletion vkconfig/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ void MainWindow::UpdateUI() {
// Launcher states
const bool has_application_list = !environment.GetApplications().empty();
ui->push_button_launcher->setEnabled(has_application_list);
ui->push_button_launcher->setText(_launch_application ? "Terminate" : "Launch");
ui->check_box_clear_on_launch->setChecked(environment.Get(LAYOUT_LAUNCHER_NOT_CLEAR) != "true");
ui->launcher_loader_debug->blockSignals(true); // avoid calling again UpdateUI
ui->launcher_loader_debug->setCurrentIndex(GetLoaderMessageType(environment.GetLoaderMessageTypes()));
Expand Down
12 changes: 10 additions & 2 deletions vkconfig_core/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ T* FindByKey(std::vector<T>& container, const char* key) {
assert(key != nullptr);
assert(std::strcmp(key, "") != 0);

const std::string low_key = ToLowerCase(std::string(key));

for (std::size_t i = 0, n = container.size(); i < n; ++i) {
if (container[i].key == key) return &container[i];
if (ToLowerCase(container[i].key) == low_key) {
return &container[i];
}
}

return nullptr;
Expand All @@ -77,8 +81,12 @@ const T* FindByKey(const std::vector<T>& container, const char* key) {
assert(key != nullptr);
assert(std::strcmp(key, "") != 0);

const std::string low_key = ToLowerCase(std::string(key));

for (std::size_t i = 0, n = container.size(); i < n; ++i) {
if (container[i].key == key) return &container[i];
if (ToLowerCase(container[i].key) == low_key) {
return &container[i];
}
}

return nullptr;
Expand Down

0 comments on commit c69d2e2

Please sign in to comment.