gui/preferences: Update Display resolution list on game window resize

This fixes the window size in the dropdown menu becoming completely
out of sync as the game window gets resized by the player with the
Display section visible.
This commit is contained in:
Iris Morelle 2023-06-05 01:20:14 -04:00
parent 2b600e22a3
commit bdaade45c0
No known key found for this signature in database
GPG key ID: BB9666228F278524

View file

@ -415,6 +415,8 @@ void preferences_dialog::post_build(window& window)
connect_signal_notify_modified(res_list,
std::bind(&preferences_dialog::handle_res_select, this));
window.connect_signal<event::SDL_VIDEO_RESIZE>(std::bind(&preferences_dialog::set_resolution_list, this, std::ref(res_list)));
/* SHOW FLOATING LABELS */
register_bool("show_floating_labels", true,
show_floating_labels, set_show_floating_labels);