aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llwindow/llwindowsdl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llwindow/llwindowsdl.cpp')
-rw-r--r--linden/indra/llwindow/llwindowsdl.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp
index 3eb4872..73753c3 100644
--- a/linden/indra/llwindow/llwindowsdl.cpp
+++ b/linden/indra/llwindow/llwindowsdl.cpp
@@ -2011,12 +2011,16 @@ void LLWindowSDL::gatherInput()
2011 // and crashness. (SL-35450) 2011 // and crashness. (SL-35450)
2012 std::string saved_locale = setlocale(LC_ALL, NULL); 2012 std::string saved_locale = setlocale(LC_ALL, NULL);
2013 2013
2014 // Do a limited number of pumps so SL doesn't starve! 2014 // Pump until we've nothing left to do or passed 1/15th of a
2015 // *TODO: this should ideally be time-limited, not count-limited. 2015 // second pumping for this frame.
2016 gtk_main_iteration_do(0); // Always do one non-blocking pump 2016 static LLTimer pump_timer;
2017 for (int iter=0; iter<10; ++iter) 2017 pump_timer.reset();
2018 if (gtk_events_pending()) 2018 pump_timer.setTimerExpirySec(1.0f / 15.0f);
2019 gtk_main_iteration(); 2019 do {
2020 // Always do at least one non-blocking pump
2021 gtk_main_iteration_do(0);
2022 } while (gtk_events_pending() &&
2023 !pump_timer.hasExpired());
2020 2024
2021 setlocale(LC_ALL, saved_locale.c_str() ); 2025 setlocale(LC_ALL, saved_locale.c_str() );
2022 } 2026 }