Skip to content

Instantly share code, notes, and snippets.

@halcy
Created July 4, 2018 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halcy/f4591b9e5a203f611f3d262cb8cb69a0 to your computer and use it in GitHub Desktop.
Save halcy/f4591b9e5a203f611f3d262cb8cb69a0 to your computer and use it in GitHub Desktop.
$citra = 'C:\Users\halcy\AppData\Local\citra\app-0.1.463\citra-qt.exe'
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = get-location
$watcher.Filter = "*.3dsx"
$watcher.IncludeSubdirectories = $false
$watcher.EnableRaisingEvents = $false
$watcher.NotifyFilter = [System.IO.NotifyFilters]::LastWrite -bor [System.IO.NotifyFilters]::FileName
while($TRUE){
$result = $watcher.WaitForChanged([System.IO.WatcherChangeTypes]::Changed -bor [System.IO.WatcherChangeTypes]::Renamed -bOr [System.IO.WatcherChangeTypes]::Created, 1000);
if($result.TimedOut){
continue;
}
write-host "ROM updated:" $result.Name
Start-Process $citra $result.Name -Wait
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment