+
    Ki  c                   sX    R t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	  ! R R]4      t
R# )zShadPS4 RunnerN)gettext)MissingGameExecutableError)Runner)systemc                   sN  a  ] tR t^t o ]! R4      t]! R4      t]! R4      .tRtRt	RRRR	R
]! R4      R]! R4      RR/.t
RRRRR
]! R4      R]! R4      R3]! R4      R3]! R4      R3.RR/RRRRR
]! R4      R]! R4      RR/RRRR R
]! R!4      RR/.tRR"RR/.tR# tR$ tR%tV tR&# )'shadps4ZShadPS4zPlayStation 4 EmulatorzSony PlayStation 4Tz%shadps4/shadPS4QtLauncher-qt.AppImageZoption	main_fileZtypeZ	directoryZlabelzGame folderZhelpz)Path to the game folder (e.g., CUSA00001)Zdefault_path	game_pathemulatorZchoiceZEmulatorZchoicesZBundledbundledzLauncher defaultZdefaultZCustomcustomcustom_emulator_pathZfilezCustom emulator pathz@Path to ShadPS4 SDL emulator (only used if 'Custom' is selected)Zadvanced
fullscreenZboolZ
FullscreenZdisable_runtimec                s    V P                  4       p\        P                  P                  V4      pR FB  p\        P                  P	                  W#4      p\
        P                  ! V4      '       g   K@  Vu # 	  R# )z4Derive the SDL emulator path from the launcher path.N)zShadps4-sdl.AppImagezshadps4-sdl.AppImagezshadPS4-sdl.AppImage)Zget_executableosZpathZdirnameZjoinr   path_exists)selfZlauncherZlauncher_dirZnameZsdl_paths   &    ;/usr/lib/python3.14/site-packages/lutris/runners/shadps4.pyget_sdl_emulator_pathZshadps4.get_sdl_emulator_path9   sZ    &&(wwx0\Dww||L7H!!(++ ]     c                s   V P                  4       pV P                  P                  R R4      pVR8X  d?   V P                  4       pV'       d   VP	                  RV.4       MsVP                  R4       MaVR8X  dJ   V P                  P                  R4      pV'       d   VP	                  RV.4       M#VP                  R4       MVP                  R4       V P                  P                  R4      ;'       g    Rp\        P                  ! V4      '       g   \        VR7      hVP	                  R	V.4       VP                  R
4       TP	                  RV P                  P                  R4      '       d   RMR.4       RV/# )r   r   z-ez-dr	   r
   r   Z )Zfilenamez-gz--z--fullscreenr   ZtrueZfalseZcommand)
Zget_commandZrunner_configZgetr   ZextendZappendZgame_configr   r   r   )r   Z	argumentsZ
emu_choiceZemu_pathZcustom_pathr   s   &     r   playZshadps4.playD   sK   $$&	 ''++J	B
"113H  $!12  &8#,,001GHK  $!45  &T" $$((5;;	!!),,,i@@$	*+ 	.D4F4F4J4J<4X4X&^efg9%%r    N)Z__name__Z
__module__Z__qualname__Z__firstlineno___Z
human_nameZdescriptionZ	platformsZrunnable_aloneZrunner_executableZgame_optionsZrunner_optionsZsystem_options_overrider   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s*    9J,-K'()IN? kKQ}%AABK	
L jHQz]9y)%&	28h'
 y
	
 ,FQ-.AXY	
 lFQ|_t		
'N6 !)*;YMN	& &r   r   )Z__doc__r   r    r   Zlutris.exceptionsr   Zlutris.runners.runnerr   Zlutris.utilr   r   r   r   r   <module>r      s%     	   8 ( W&f W&r   