+
    ºKžiš  c                   sl   € R t ^ RIt^ RIHtHtHtHtHtHtH	t	H
t
 ^ RIHt ^t ! R R]4      tR tR tR# )z$Nvidia library detection from ProtonN)ÚCDLLÚPOINTERÚ	StructureÚ	addressofÚc_char_pÚc_intÚc_void_pÚcast)Úloggerc                   s0   € ] tR t^tRtR]3R]3R]3.tRtR# )ÚLinkMapa  
from dlinfo(3)

struct link_map {
    ElfW(Addr) l_addr;  /* Difference between the
                           address in the ELF file and
                           the address in memory */
    char      *l_name;  /* Absolute pathname where
                           object was found */
    ElfW(Dyn) *l_ld;    /* Dynamic section of the
                           shared object */
    struct link_map *l_next, *l_prev;
                        /* Chain of loaded objects */
    /* Plus additional fields private to the implementation */
};
Zl_addrÚl_nameZl_ld© N)	Z__name__Z
__module__Z__qualname__Z__firstlineno__Ú__doc__r   r   Z_fields_Z__static_attributes__r   ó    Ú7/usr/lib/python3.14/site-packages/lutris/util/nvidia.pyr	   r	      s$   † ñð" ˜8Ð$ x°Ð&:¸VÀXÐ<NÐO„Hr   r	   c                 s  €  \        R4      p  \        R4      pT P                  p\
        \        \
        3Tn        \        Tn        \        \        4      ! 4       pT! TP                  \        \        T4      4      ^ 8w  d   \        P                  ! R4       R# \        T\        \        4      4      P                  pTP                   f   \        P                  ! R4       R#  \"        P$                  ! TP                   4      p\"        P(                  P+                  T4      #   \         d    \        P                  ! R4        R# i ; i  \         d     R# i ; i  \&         d#   p\        P                  ! RT4        Rp?R# Rp?ii ; i)z5Return the absolute path to the libGLX_nvidia libraryz
libdl.so.2zUnable to load libdl.so.2NzlibGLX_nvidia.so.0z!Unable to read Nvidia informationz%Error reading the Nvidia library pathz*Error decoding the Nvidia library path: %s)r    ZOSErrorr   ZerrorZdlinfor   r   ZargtypesZrestyper   r	   Z_handleÚRTLD_DI_LINKMAPr   r   Zcontentsr
   ÚosZfsdecodeZUnicodeDecodeErrorÚpathZrealpath)ZlibdlZlibglx_nvidiaZdlinfo_funcZglx_nvidia_info_ptrZglx_nvidia_infoZlibglx_nvidia_pathZexs          r   Úget_nvidia_glx_pathr       sE  € ðÜ\Ó"ˆð
ÜÐ1Ó2ˆð —,‘,€KÜ#¤U¬HÐ4€KÔÜ€KÔô "¤'Ô*Ó,Ðñ =×(Ñ(¬/¼9ÐEXÓ;YÓZÐ^_Ô_ÜŠÐ8Ô9Ùô Ð.´¼Ó0@ÓA×JÑJ€Oð ×ÑÒ%ÜŠÐ<Ô=ÙðÜŸ[š[¨×)?Ñ)?Ó@Ðô 7‰7×ÑÐ.Ó/Ð/øôO ô ÜŠÐ0Ô1Úðûô ô Úðûô8 ô ÜŠÐAÀ2ÔFÝûðús:   ‚D! ŽE	 Ã" E Ä!!EÅEÅ	EÅEÅFÅ&FÆFc                 s2  € \        4       p V '       g   R# \        P                  P                  \        P                  P	                  V 4      R4      p\        P                  P                  \        P                  P                  VR4      4      '       d   V# R# )záReturn the path to the location of DLL files for use by Wine/Proton
from the NVIDIA Linux driver.
See https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/issues/71 for
background on the chosen method of DLL discovery.
Nznvidia/winez	nvngx.dll)r   r   r   ZjoinZdirnameZexists)Zlibglx_pathZnvidia_wine_dirs     r   Úget_nvidia_dll_pathr   N   sa   € ô &Ó'€KßÙÜ—g‘g—l‘l¤2§7¡7§?¡?°;Ó#?ÀÓO€OÜ	‡ww‡~~”b—g‘g—l‘l ?°KÓ@×AÒAØÐñ Br   )r   r   Zctypesr    r   r   r   r   r   r   r   Zlutris.util.logr   r   r	   r   r   r   r   r   Ú<module>r      s5   ðÙ *ã 	ß W× WÓ Wå "à€ôPˆiô Pò*+0ô\r   