a
    6i                     @   s0   d Z ddlmZ edddZddddZdS )	zDRun some tests and generate warnings for proton configuration issues   )log)returnc                  C   sb   d} t ddd>}| }t|dk r@t|  W d   dS W d   n1 sT0    Y  dS )	zCheck esync file limits using /proc/sys/fs/file-max

    https://www.reddit.com/r/SteamPlay/comments/9kqisk/tip_for_those_using_proton_no_esync1/
    zFile descriptor limit is low
    This can cause issues with ESYNC
    For more details see:
    https://github.com/zfigura/wine/blob/esync/README.esync
    z/proc/sys/fs/file-maxascii)encodingi    NFT)openreadlineintr   warn)warningZfsmaxZ	max_files r   _/home/james-whalen/.local/share/Steam/compatibilitytools.d/GE-Proton10-32/protonfixes/checks.pyesync_file_limits   s    
.r   Nc                  C   s(   t d t g} t| r$t d dS )z,Run checks to notify of any potential issueszRunning checkszAll checks successfulN)r   infor   all)checksr   r   r   
run_checks   s
    
r   )__doc__loggerr   boolr   r   r   r   r   r   <module>   s   