summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/windows/window.cpp')
-rw-r--r--src/osd/windows/window.cpp27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index b94f68f570a..a5da299cddd 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -251,6 +251,7 @@ void windows_osd_interface::update_slider_list()
{
for (win_window_info *window = win_window_list; window != nullptr; window = window->m_next)
{
+ // check if any window has dirty sliders
if (window->m_renderer && window->m_renderer->sliders_dirty())
{
build_slider_list();
@@ -271,27 +272,13 @@ int windows_osd_interface::window_count()
void windows_osd_interface::build_slider_list()
{
- m_sliders = nullptr;
- slider_state *curr = m_sliders;
- for (win_window_info *info = win_window_list; info != nullptr; info = info->m_next)
+ // FIXME: take all sliders from all windows without concatenate them by slider_state->next
+
+ for (win_window_info *window = win_window_list; window != nullptr; window = window->m_next)
{
- slider_state *window_sliders = info->m_renderer->get_slider_list();
- if (window_sliders != nullptr)
- {
- if (m_sliders == nullptr)
- {
- m_sliders = window_sliders;
- curr = m_sliders;
- }
- else
- {
- while (curr->next != nullptr)
- {
- curr = curr->next;
- }
- curr->next = window_sliders;
- }
- }
+ // take the sliders of the first window
+ m_sliders = window->m_renderer->get_slider_list();
+ return;
}
}