target_devicehint(3)
okay bestie, real talk: this one's from the Arcan Lua API and it's a whole multitasker π
β¨ NAME β¨
target_devicehint β change connection- and device- use for a frameserver connection π¦
β¨ SYNOPSIS β¨
nil
target_devicehint( vid:dsrv, number:device )
target_devicehint( vid:fsrv, string:target )
target_devicehint( vid:fsrv, string:target, bool:force(=false) )
β¨ DESCRIPTION β¨
okay so this function literally serves several uses and honestly it's giving main character energy with how many hats it wears π
Use case number one: forwarding a device handle to an accelerated client π This happens when you pass the device argument and it matches a valid card identifier. If you hand it an invalid identifier tho? no big deal, the call just gets interpreted as a mode hint, periodt.
The mode argument can also be specified as a device-use hint. Bestie, previously this was used to indicate whether the client should produce a buffer for direct output on the device in question β but that's now done heuristically as part of map_video_display calls. So the valid values now are:
DEVICE_INDIRECTβ for composed rendering πDEVICE_LOSTβ this one says the currently used GPU should be dropped and, if possible, revert to software-defined graphics π
The other uses are with a string target. This is what you use to indicate a connection point to another arcan-shmif capable server β¨ The default vibe is to mark this as a hint: 'in the event of the main connection being lost, please go here' π«Ά
If the force argument is also set, the connection may be forcibly severed to make the client switch to the specified connection point π The target string is assumed to match the valid rules for a connection point, but if the association is not forced, an empty string is also valid and will be interpreted as disabling a previously set alternate connection. iconic.
There are two special forms to the target string:
- the
a12://anda12s://prefix β this will involve thearcan-nettool to connect to a server π - the
@or@hostsuffix β likemytag@. This will use keystore tags to find outbound connection parameters π
These forms will also provide the fsrv vid access to a keystore capability π
β¨ NOTES β¨
- The keystore access is currently the same as the one handed to the
arcanprocess. Bestie, this may be changed in the future π - If the forced target migration mode is used on a frameserver launched in an authoritative mode via
define_avfeedor similar functions, the process tracking will be disabled and the kill 'guarantee' ondelete_imagewill be lost π for real, keep that in mind.
lowkey important: note 2 is the one that'll bite you π«Ά
β¨ EXAMPLE β¨
function target_devicehint0()
target_alloc("devicehint", function(source, status)
if (status.kind == "connected") then
target_devicehint(source, "devicehint", true); -- send fallback path
target_devicehint(source, 0); -- send rendernode
end
end);
end
and that's the whole page, bestie π this came to you from targetcontrol, dated October 2026, and it's all target_devicehint(3) energy. slay, go write some frameservers πβ¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms