Commit Graph

2162 Commits (e5ccf7a2a3288569eab210e9d29aeb9dd7964880)

Author SHA1 Message Date
Rye e5ccf7a2a3 Remove dead code for macos versions 10.6 and older 2025-08-22 03:08:28 -04:00
Rye ba30737d8f Merge branch 'develop' of github.com:secondlife/viewer into rye/infinitemac 2025-08-20 18:04:55 -04:00
Andrey Kleshchev 6f072c2121
Merge 2025.06 into develop
Merge 2025.06 into develop
2025-08-14 11:17:35 +03:00
Erik Kundiman 971f131ba7
Discord without auth & "Hidden Region" instead of blank (#4496)
* Rich Presence w/o requiring access to friends list

Thank you Signal Linden for the pointer from https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#af0a85e30f2b3d8a0b502fd23744ee58e
"Note: On Desktop, rich presence can be set before calling Client::Connect, but it will be cleared if the Client connects. When Client is not connected, this sets the rich presence in the current user's Discord client when available."
This lead me to setting the Application ID here https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ad452335c06b28be0406dab824acccc49 in place of setting it on
https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1AuthorizationArgs.html which would lead Authorize, GetToken, UpdateToken, Connect, and so on.
This means we don't even need the SecAPI saveCredential, loadCredential and deleteCredential parts now.

* Discord integration is enabled by default per spec

now that we don't need the user to authorise Discord SDK to have
any access to the user's friends list, etc. (which are Discord
Relationships related, and not needed just for Rich Presence).

* "Hidden Region" if Discord location sharing is off

instead of blank. The coords are hidden too, but the Party numbers
are still shown, for consistency with TPVs' implementations.

* Remove toggleDiscordIntegration declaration

The definition had already been removed, I had forgotten to remove
this one.
2025-08-08 10:45:26 -07:00
Andrey Kleshchev ce9d66cdd1 Merge branch develop into 2025.06
# Conflicts:
#	indra/newview/llvoavatar.cpp
2025-08-06 16:05:19 +03:00
Andrey Kleshchev acc8928330
Merge release/2025.05 into develop 2025-08-06 14:17:18 +03:00
Erik Kundiman afcc64cb07
Rich Presence support using Discord Social SDK (#4457)
* Rich Presence support using Discord Social SDK

Download DiscordSocialSdk-1.4.9649.zip from
https://discord.com/developers/applications/1394782217405862001/social-sdk/downloads
Add -DUSE_DISCORD:BOOL=ON to your cmake line.
The Discord app needs to be set to be a public client in the OAuth2 tab.
All Discord-related code are contained within one file, llstartup.cpp,
and other classes access it through some opaque layer, static functions,
otherwise we'd get these "duplicate symbol" linking errors.

* Move Discord-related code to llappviewer.cpp

The doFrame is the one called over and over again, so running the
Discord callbacks from there shouldn't have one extra function
overhead, while running the Discord initialisation is only once so
it's much more okay to have the extra function overhead there.

* panel_preferences_privacy tabs

Add tab and checkboxes for discord social SDK integration options to panel_preferences_privacy.xml

* Shorten Discord-related local variable names

* Connect to Discord now through privacy tab

Now the access token is saved the way passwords are saved, but
without a username, so we can have some persistence without having
to implement an OAuth2 backend server cause we would have to store
those tokens there anyway still, and it's just simpler to not go
that way. Discord Social SDK doesn't have a helper for sending code
to a custom server anyway, that we would have to have some
asynchronous HTTP requestor ready.
Show location check button gets enabled only when Discord
integration is enabled, though it's not functioning yet.

* Location for Discord Rich Presence Activity State

I was going to use LLAgentUI::buildLocationString but there's no
location format that shows only region and coords without having
to have the parcel name empty, so I copied buildLocationString
implementation in the case of LOCATION_FORMAT_NO_MATURITY but when
the parcel name is empty.
I had to make updateDiscordActivity check agent's ID and the
existence of agent avatar pointer first before trying to set
Activity Details or State, cause I like the "Show location" button
be checkable not only after online when both the ID & pointer will
have existed. I think this way is simpler than programmatically
enabling the "Show location" button after the user is logged in.
I put a trigger to Activity update somewhere after the user is
logged in for now, not yet after a TP.
The elapsed time gets reset whenever Activity is updated for now,
but I'll try to make elapsed time extended instead.
No Party for now, because I couldn't find a way to make a Party
shown without showing its CurrentSize (I could still get away not
showing its MaxSize by setting it to 0), so the State (location)
is shown above the elapsed time, not on the right of it.
I'll try to figure out to get some representative numbers for its
CurrentSize & MaxSize next.
Also no privacy on hiding the username for now, until the UI is
ready.

* Update Rich Presence location on region change

I had to find a spot in source code where it doesn't cause a crash
(it did in LLAgent::setRegion), but I'm not removing the one in
llstartup.cpp because on login, the one in llviewermessage.cpp
gets only the placeholder coords (10, 10, 10).

* Show display name too on Discord Rich Presence

Avatar name cache can be used right away upon login now after I
moved the update call to the end of PRECACHE section in llstartup.

* Show Discord Rich Presence Activity Party

By setting CurrentSize to the number of people within chat radius,
and MaxSize to the number of people within near range.

* Call updateDiscordActivity too in Discord init

so when the user enables the integration after being logged in,
the init can show the name and location right away.

* Discord Rich Presence: Hide name & connect to llappviewer.cpp

Add option to show/hide avatar name in privacy panel & connect rich presense directly to llappviewer.cpp

* Discord time elapsed not reset on region change

Time elapses right after viewer launch even before login.
Plus parameter name change in header to make it the same as in
implementation.

* Cache bool setting retrievals in updateDiscordActivity

As suggested by Andrey Kleschev.
getBOOL and getF32 are expensive, so using `static LLCachedControl<>`
is the way to do it in llappviewer.cpp.

* Check Discord creds existence before getting token

as suggested by Andrey Kleshchev, anticipating external factors
such as user moving settings from another PC.

* Tracy visibility for looped Discord function calls

As suggested by Andrey Kleshchev. They likely can get pricey so
they need to be visible in the profiler.

* Discord-related error handling/logging

plus delay saving Discord credentials to only after the access
token is successfully updated on Discord, and try to disconnect
from Discord when the integration gets disabled regardless whether
there are credentials to delete or not and whether there's an
access token to revoke or not.

* Use getAvatars already called for Discord Party numbers

so we don't have to make any extra getAvatars calls just for this,
as it's pricy in crowds, and we'll just be piggybacking
`updateSpeakerList` and `updateNearbyList`.

* Assemble Discord Activity Details only once

by saving it to a static global string for reuse.

* Remove updateDiscordActivity call in startup loop

The State field (region & coords) is updated well enough without it
now.

* Rename handleDiscordSocial to toggleDiscordIntegration

* Update Discord Activity only when integration is enabled

No need to check setting for the status change callback one,
because getting there would need to be connected to Discord first,
which in turn needs the integration to be enabled first.

---------

Co-authored-by: Secret Foxtail <remmy@megapahit.net>
2025-07-31 08:54:39 -07:00
Andrey Kleshchev f80d62e6b2 #3851 Increase cache size
Increases default to 8GB and maximum to 32GB.
Viewer now supports 2K textures which require more space, so altered
disk cache vs textures space a little.
Made spinner a bit wider to properly fit whole cache string.
2025-07-24 03:13:17 +03:00
Andrey Kleshchev 4b69fe396f #4320 MacOS crash handling 2025-07-19 20:47:47 +03:00
Andrey Kleshchev 211b6c65fd #4337 Full Screen debug setting on MacOS results in a black screen 2025-07-16 23:41:54 +03:00
Andrey Kleshchev 3da493295e #4296 Crash at renderMorphMasks 2025-07-09 23:16:17 +03:00
Andrey Kleshchev 76dd9385f9 #4315 Crash in GLTF uploader
Properly handle importer's crashes in general
2025-07-02 01:40:50 +03:00
Andrey Lihatskiy b08ba3fa7b Merge branch 'main' into marchcat/2505-merge
# Conflicts:
#	.github/workflows/qatest.yaml
#	indra/llcommon/llsdutil.h
#	indra/llui/llflatlistview.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/lloutfitgallery.cpp
#	indra/newview/lloutfitgallery.h
2025-05-28 21:38:00 +03:00
Jonathan "Geenz" Goodman fe4f85e587 Merge remote-tracking branch 'origin/main' into geenz/2025.04-to-develop 2025-05-28 11:52:16 -04:00
Andrey Kleshchev a0cbf22d64 #4001 Bump cache version 2025-05-01 12:09:09 +03:00
Ansariel d6b8628a4f Reduce memory allocations pinging the mainloop timeout 2025-04-18 23:09:51 +03:00
Mnikolenko Productengine 90c7684112 #3758 add support for highlighted segments 2025-04-18 19:59:09 +03:00
Jonathan "Geenz" Goodman 52cca995cc Merge branch 'release/2025.04' into rye/forevermac 2025-04-15 13:55:01 -04:00
Andrey Lihatskiy ae93198735 Merge branch 'main' into marchcat/maint-c-restore
# Conflicts:
#	indra/llcommon/lldate.h
#	indra/newview/llappviewer.cpp
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llmaterialeditor.cpp
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llvoavatar.cpp
2025-04-15 19:31:20 +03:00
Andrey Lihatskiy 1f17536cc8 #3900 Skip checking AFK status during startup states 2025-04-13 01:43:36 +03:00
Andrey Lihatskiy 5d7a5001b4 Merge commit '9e24b30' into marchcat/maint-c/restore
# Conflicts:
#	indra/llmath/v2math.cpp
#	indra/llmath/v2math.h
#	indra/llmath/v3math.h
#	indra/llmath/v4math.h
#	indra/llui/llfolderviewitem.cpp
#	indra/llui/llfolderviewitem.h
#	indra/llui/llfolderviewmodel.h
#	indra/llui/llmodaldialog.cpp
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltexteditor.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/newview/llagent.cpp
#	indra/newview/llagentcamera.h
#	indra/newview/llavatarrenderinfoaccountant.cpp
#	indra/newview/llconversationmodel.h
#	indra/newview/llfloaterinventorysettings.cpp
#	indra/newview/llfloaternamedesc.cpp
#	indra/newview/llfloaternamedesc.h
#	indra/newview/llfloaterobjectweights.cpp
#	indra/newview/llfloaterobjectweights.h
#	indra/newview/llfolderviewmodelinventory.h
#	indra/newview/llinspecttexture.cpp
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventorygallery.h
#	indra/newview/llinventorygallerymenu.cpp
#	indra/newview/llinventorymodel.cpp
#	indra/newview/llinventorypanel.cpp
#	indra/newview/llinventorypanel.h
#	indra/newview/llmaterialeditor.cpp
#	indra/newview/lloutfitgallery.cpp
#	indra/newview/lloutfitgallery.h
#	indra/newview/lloutfitslist.cpp
#	indra/newview/lloutfitslist.h
#	indra/newview/llpanelgroupcreate.cpp
#	indra/newview/llpanelgroupgeneral.cpp
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpaneloutfitsinventory.h
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelwearing.cpp
#	indra/newview/llreflectionmap.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/llsidepanelappearance.cpp
#	indra/newview/llsidepaneliteminfo.cpp
#	indra/newview/llteleporthistorystorage.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltexturectrl.h
#	indra/newview/lltexturefetch.cpp
#	indra/newview/lltexturefetch.h
#	indra/newview/llviewerassetupload.cpp
#	indra/newview/llviewercamera.cpp
#	indra/newview/llviewercamera.h
#	indra/newview/llviewermenufile.cpp
#	indra/newview/llviewerobject.h
#	indra/newview/llviewertexture.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/llvoavatar.cpp
#	indra/newview/llvoavatar.h
#	indra/newview/llvoavatarself.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/llvovolume.h
#	indra/newview/tests/llviewerassetstats_test.cpp
2025-04-10 06:01:50 +03:00
Andrey Lihatskiy 2813097aff Merge commit '7947ce3' into marchcat/maint-c/maint-c-restore
# Conflicts:
#	indra/newview/llappviewer.cpp
2025-04-10 01:05:12 +03:00
Andrey Kleshchev 9aea5bb5e2 #3876 sendLogoutRequest logging
mac's crash logs seem to get mixed with normal logs, hope is this will
help confirming the issue. Also needed for automated testing.
2025-04-04 22:43:27 +03:00
Jonathan "Geenz" Goodman ccdcbfeebd Merge branch 'release/2025.03' into release/2025.04 2025-04-01 13:10:33 -04:00
Maxim Nikolenko 515c1f15d8
#3044 Add option to hide L$ balance for Snapshots with Interface showing 2025-03-31 19:06:06 +03:00
Andrey Kleshchev e671cb54fe #3795 Crash at getVolatileAPRPool() 2025-03-30 13:38:34 +03:00
Andrey Kleshchev d67859e483 Use LLCachedControl in llviewerwindow and llappviewer
Getting from gSavedSettings is expensive to do so often
2025-03-27 18:29:19 +02:00
Andrey Kleshchev c99e3167ed #3644 Adjust throttle based of how busy buffer is 2025-03-18 21:25:09 +02:00
Jonathan "Geenz" Goodman e0d14e02e1 Merge branch 'release/2025.03' into rye/forevermac 2025-03-11 22:44:49 -04:00
Andrey Lihatskiy 4132a13972 Merge branch 'marchcat/maint-b-cherrypicks' into marchcat/2025.03-maint-b 2025-03-11 05:10:11 +02:00
Alexander Gavriliuk 95a395de22 #1080 BugSplat Crash: LLAppViewer::initStrings() - show crash reason 2025-03-11 04:22:22 +02:00
Andrey Kleshchev 88f503ecc3 viewer-private#217 Cef log was deleted too often
delete once per session, not once per instance

# Conflicts:
#	indra/newview/llviewermedia.cpp
2025-03-11 04:21:01 +02:00
Andrey Kleshchev 5c2a331c44 #3644 Fix new logging of packet drops hitting performance #2
Misunderstood how mDroppedPackets worked, clear out what's not needed
2025-03-05 13:32:46 +02:00
Andrey Kleshchev 3efe5b4934 #3644 Fix new logging of packet drops hitting performance 2025-03-04 21:15:15 +02:00
Andrey Kleshchev ed394cd5a0 #3591 rethrow should be mac specific
Jumped the gun a bit, since reportCrashToBugsplat is OS specific,
restore rethrow for other systems.
2025-03-04 17:23:05 +02:00
Andrey Kleshchev 2f362aa126
Merge pull request #3583 'faster avatar loading' into release/2025.03 2025-02-27 20:51:04 +02:00
Andrew Meadows b52842ee2a theoretical earlier start to asset downloads during startup (#3589)
* process UDP packets earlier in startup sequence

* call lazyAttach() when nonzero pending attachments
2025-02-27 19:50:17 +02:00
Andrey Kleshchev 39610cbfb3 #3591 Remove now pointless rethrow 2025-02-26 21:50:46 +02:00
Andrey Kleshchev 056dc00ebe #3591 More test coverage for crashes 2025-02-25 22:10:08 +02:00
Andrey Kleshchev 847fd636cd Merge branch release/2025.03
# Conflicts:
#	indra/newview/llmeshrepository.cpp
#	indra/newview/llmeshrepository.h
2025-02-19 17:29:48 +02:00
Andrey Kleshchev 8c1f00eebc
Merge Forever Fps into 2025.03
Merge Forever Fps into 2025.03
2025-02-19 14:06:26 +02:00
Andrew Meadows 6d0b0a77ee
drain UDP socket to avoid dropped packets (#3565)
drain UDP socket in idleNetwork() to avoid dropped packets
2025-02-18 11:38:52 -08:00
Andrey Kleshchev 60121683ea #3520 Name name cache based on grid 2025-02-18 18:40:39 +02:00
Rye 4ab2a80e6c Use SSE2NEON to emulate SSE intrinsics when building against an ARM target 2025-02-11 05:04:10 -05:00
Rye 6fcd349f37 Fix Tracy memory profiling overloads for aligned allocations
Fix disabling renderdoc support
Improve ll_aligned_alloc functions on darwin for 32 and 64byte aligned by utilizing posix_memalign
2025-02-11 05:04:05 -05:00
Andrey Kleshchev b84f3ff6b1 viewer#2780 Speed up terrain loading on teleport
Terrain was arriving and processing too late resulting in issues like
"Lower terrain material incorrectly shown momentarily"
2025-02-05 18:50:31 +02:00
Andrey Kleshchev c405cd379a #3488 Avoid reading meshes from disk when not nessesary
LLMeshHeaderHandler preallocates file with empty data, there is no point
reading large empty sections so write presense flags at the start of the
file
2025-01-31 03:41:04 +02:00
Andrey Kleshchev fd577e3bfc #3400 Reimplement LLError marker for crash statistics 2025-01-30 01:35:49 +02:00
Andrey Kleshchev 01bd15d4be #3431 Include session id with last exec event 2025-01-22 16:06:30 +02:00
Andrey Kleshchev de1ff0bd10 viewer#3088 Add graphical init and reinit 2025-01-22 16:06:30 +02:00