tzerk / BDO-Watchdog

A monitoring tool for Black Desert Online with Telegram messaging support
MIT License
20 stars 4 forks source link

Addition: Add option to set BlackDesert64.exe process as low priority process #9

Closed mzngr closed 7 years ago

mzngr commented 7 years ago

New feature, Low necessity:

I thought it could be nice to have an option, maybe a toggle button, to set all Black desert processes (including any CoherentUI_Host.exe instance) to low priority at once to further reduce their weight on system resources.

I don't know if it is possible to detect if BDO is minimized, if it is possible then it would be great to have an option to apply low priority automatically when the application gets minimized, and also restore it to normal priority as soon as it is not minimized anymore.

tzerk commented 7 years ago

Hey, sorry for not having answered earlier and thanks for the suggestion. This sounds like a good idea, but I will have to look first if and how this would be possible in Go (with reasonable effort).

EDIT: Unfortunately, the syscall package doesn't provide a native function for that, at least for Windows. An alternative approach would, again, be to use the command line as in:

wmic process where name="calc.exe" CALL setpriority "idle"

Source

tzerk commented 7 years ago

I added a new option to the config.yml called "processpriority" that allows setting the priority of the BlackDesert64.exe. Unfortunately, there is no straightforward way to detect whether BDO is minimized or not. As for CoherentUI_Host.exe I think it is best to just use the killcoherentui option, i.e., to permanently kill the process. Anyway, this feature will be available with the next release.

tzerk commented 7 years ago

Included in v0.1.8