diff options
author | Jacek Antonelli | 2008-08-15 23:45:39 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:39 -0500 |
commit | fdb921e78b7b0e05f6e7e47e0c238bb87ee1afbc (patch) | |
tree | 3879991f681c965dce8040bb9deece680fc9f287 /linden/indra/llwindow/llwindowsdl.cpp | |
parent | Second Life viewer sources 1.19.1.3 (diff) | |
download | meta-impy-fdb921e78b7b0e05f6e7e47e0c238bb87ee1afbc.zip meta-impy-fdb921e78b7b0e05f6e7e47e0c238bb87ee1afbc.tar.gz meta-impy-fdb921e78b7b0e05f6e7e47e0c238bb87ee1afbc.tar.bz2 meta-impy-fdb921e78b7b0e05f6e7e47e0c238bb87ee1afbc.tar.xz |
Second Life viewer sources 1.19.1.4
Diffstat (limited to 'linden/indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.cpp | 16 |
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 | } |