diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ccff34..0799e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## \[v0.1.2] return reverse order of pids in `find_dolphin()` (2022/07/20) +- Return pids from the newest to the oldest +- Add optional self to `Dolphin.find_dolphin()`, making it available to call from instance + ## \[v0.1.1] use psutil to find pid of dolphin (2022/06/26) Use psutil to achieve cross-platform pid finding. This also fixes the dependency issue on Linux. diff --git a/setup.cfg b/setup.cfg index c55e3b7..d2bc9ec 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = sup-dolphin-memory-lib -version = 0.1.1 +version = 0.1.2 author = sup39 author_email = sms@sup39.dev description = A Python library for reading and writing the memory of an emulated game in Dolphin diff --git a/src/dolphin/memorylib.py b/src/dolphin/memorylib.py index 1fa36fe..2ec0ab4 100644 --- a/src/dolphin/memorylib.py +++ b/src/dolphin/memorylib.py @@ -21,12 +21,12 @@ dolphinProcNames = \ ('Dolphin.exe', 'DolphinQt2.exe', 'DolphinWx.exe') if os.name == 'nt' \ else ('dolphin-emu', 'dolphin-emu-qt2', 'dolphin-emu-wx') -def find_dolphin(): +def find_dolphin(self=None): return [ proc.pid for proc in process_iter() if proc.name() in dolphinProcNames - ] + ][::-1] # newest to oldest ''' @typedef {(int|str) | [(int|str), ...int[]]} Addr