Closed microraptor closed 2 years ago
I also changed the Ctrl+h key binding to Alt+h. mpv's default Ctrl+h is used to toggle hardware decoding on/off. This key binding is useful, because the script doesn't work with at least some types of hardware decoding, as I noted in the new readme. There is no default mpv key binding for Alt+h.
I added some code now to automatically disable hardware decoding, if it is detected. After the histogram is toggled off the HW decoding is enabled again. I also changed the commands are are used for filter management, which simplifies stuff a little.
Great catch on the bugs. Glad the script was of any use to anyone in the first place. The no-osd
command is neat, I must've missed it back when I wrote this.
Thank you for the very useful script! Since I noticed very weird behavior on one of my computers I took a look at the code and fixed the toggleFilter function. This resolves the weird behavior described in issue #5, and makes the script function as it should ~on one of the computers~.
The function had two bugs:
Besides these fixes I also added comments and log messages.
The similar rebuildGraph functioned also correctly before, but I removed the unnecessary if statement, because in Lua a
for i = 0, 1, -1 do
loop doesn't even run the loop once.