1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Add missing setting callbacks for display_density_factor (#15273)

This commit is contained in:
grorp
2024-10-12 22:34:39 +02:00
committed by GitHub
parent 2188adc0f9
commit 5532248cd7
3 changed files with 20 additions and 14 deletions

View File

@@ -61,6 +61,7 @@ Hud::Hud(Client *client, LocalPlayer *player,
readScalingSetting();
g_settings->registerChangedCallback("dpi_change_notifier", setting_changed_callback, this);
g_settings->registerChangedCallback("display_density_factor", setting_changed_callback, this);
g_settings->registerChangedCallback("hud_scaling", setting_changed_callback, this);
for (auto &hbar_color : hbar_colors)
@@ -170,6 +171,7 @@ void Hud::readScalingSetting()
Hud::~Hud()
{
g_settings->deregisterChangedCallback("dpi_change_notifier", setting_changed_callback, this);
g_settings->deregisterChangedCallback("display_density_factor", setting_changed_callback, this);
g_settings->deregisterChangedCallback("hud_scaling", setting_changed_callback, this);
if (m_selection_mesh)