diff options
author | simon-linden <57500096+simon-linden@users.noreply.github.com> | 2023-05-12 20:21:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 20:21:28 -0700 |
commit | 74ed32837ba29f360e113172044495e8213617a1 (patch) | |
tree | 0f594c5fd7985baebc8acd3f52893e1675b57375 /indra/newview/llviewermenu.cpp | |
parent | a9c64940cbac27328b6304f9d63cdf4265fae2f7 (diff) | |
parent | 81f1be67109885f98f649974022aa6d444dd633d (diff) |
Merge pull request #211 from secondlife/sl-19676-loading-stats
sl-19676 - more loading stats and 360 Interest List mode work
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 63 |
1 files changed, 11 insertions, 52 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d1b240d2c4..fe6676759d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1301,65 +1301,24 @@ class LLAdvancedToggleInterestList360Mode : public view_listener_t public: bool handleEvent(const LLSD &userdata) { - LLSD request; - LLSD body; - - // First do a GET to report on current mode and update stats - if (gAgent.requestGetCapability("InterestList", - [](const LLSD &response) { - LL_DEBUGS("360Capture") << "InterestList capability GET responded: \n" - << ll_pretty_print_sd(response) << LL_ENDL; - })) + // Toggle the mode - regions will get updated + if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360) { - LL_DEBUGS("360Capture") << "Successful GET InterestList capability request with return body: \n" - << ll_pretty_print_sd(body) << LL_ENDL; - } - else - { - LL_WARNS("360Capture") << "Unable to GET InterestList capability request with return body: \n" - << ll_pretty_print_sd(body) << LL_ENDL; - } - - // Now do a POST to change the mode - if (sUsing360) - { - body["mode"] = LLSD::String("default"); - } - else - { - body["mode"] = LLSD::String("360"); - } - sUsing360 = !sUsing360; - LL_INFOS("360Capture") << "Setting InterestList capability mode to " << body["mode"].asString() << LL_ENDL; - - if (gAgent.requestPostCapability("InterestList", body, - [](const LLSD &response) { - LL_DEBUGS("360Capture") << "InterestList capability responded: \n" - << ll_pretty_print_sd(response) << LL_ENDL; - })) - { - LL_DEBUGS("360Capture") << "Successfully posted an InterestList capability request with payload: \n" - << ll_pretty_print_sd(body) << LL_ENDL; - return true; - } - else - { - LL_DEBUGS("360Capture") << "Unable to post an InterestList capability request with payload: \n" - << ll_pretty_print_sd(body) << LL_ENDL; - return false; - } - }; - - static bool sUsing360; + gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT); + } + else + { + gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); + } + return true; + } }; -bool LLAdvancedToggleInterestList360Mode::sUsing360 = false; - class LLAdvancedCheckInterestList360Mode : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return LLAdvancedToggleInterestList360Mode::sUsing360; + return (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360); } }; |