ó
:…6ic           @   sš   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d a e	 a
 e j ƒ  a e j j d ƒ Z d „  Z d „  Z d „  Z d „  Z d S(   iÿÿÿÿNt   PRESPLASHEVENTc           C   sD   t  j j t d ƒ x t r, t  j j ƒ  q Wt  j j t d ƒ d S(   s9   
    Disposes of events while the window is running.
    i   i    N(   t   pygame_sdl2t   timet	   set_timerR    t   keep_runningt   eventt   wait(    (    (    sf   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\presplash.pyt   run_event_thread.   s    	c         C   sµ  d t  j k r d Sd d g } x2 | D]& } | | } t  j j | ƒ r& Pq& q& Wd St j r’ d d l } d d l m } m } | j	 j
 j ƒ  n  t j j ƒ  t j j | | ƒ } t j j d ƒ } | j ƒ  \ }	 }
 | d | d d |	 d } | d	 | d
 d |
 d } t j j t j d | j ƒ  d t j d | | f ƒa | j t j ƒ  ƒ } t j ƒ  j | d ƒ t j ƒ  t j d t ƒ a t  t _! t j" ƒ  t# j# ƒ  a$ d S(   s9   
    Called to display the presplash when necessary.
    t   RENPY_LESS_UPDATESNs   /presplash.pngs   /presplash.jpgiÿÿÿÿ(   t   c_void_pt   c_inti    i   i   i   t   flagst   post   target(   i    i    (%   t   ost   environt   patht   existst   renpyt   windowst   ctypesR	   R
   t   windllt   user32t   SetProcessDPIAwareR   t   displayt   initt   imaget   loadt   get_display_boundst   get_sizet   Windowt   syst   argvt   WINDOW_BORDERLESSt   windowt   convert_alphat   get_surfacet   blitt   updatet	   threadingt   ThreadR   t   event_threadt   Truet   daemont   startR   t
   start_time(   t   basedirt   gamedirt	   filenamest   fnR   R	   R
   t   imgt   boundst   swt   sht   xt   y(    (    sf   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\presplash.pyR,   ;   s<    
		
	
	
c           C   s4   t  d k r d St a t j ƒ  t  j ƒ  d a  d S(   sM   
    Called just before we initialize the display to hide the presplash.
    N(   R"   t   Nonet   FalseR   R)   t   joint   destroy(    (    (    sf   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\presplash.pyt   ends   s    	

c          C   sM   t  p t j s d St t j j t j ƒ  }  |  d k rI t j |  ƒ n  d S(   s<   
    Sleep to the end of config.minimum_presplash_time.
    Ni    (   R"   R   t   mobileR-   t   configt   minimum_presplash_timeR   t   sleep(   t	   remaining(    (    sf   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\presplash.pyR@   ‡   s
    (   R'   R   t   os.pathR   R   R   R   R8   R"   R9   R   R-   R   t   registerR    R   R,   R<   R@   (    (    (    sf   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\display\presplash.pyt   <module>   s   		8	