-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add disgusting workaround for an FL bug
When switching to an effect plugin, there's now a 3 tick delay before it is activated, since sometimes closing a generator plugin causes FL to think that an effect plugin is open which causes a crash if the script tries to do anything with that plugin
- Loading branch information
1 parent
3a0bd47
commit 0003a37
Showing
3 changed files
with
55 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* Miguel Guthridge [[email protected], HDSQ#2154] | ||
""" | ||
|
||
from common.profiler import profilerDecoration | ||
from common.logger import log, verbosity | ||
from common.util.apifixes import ( | ||
PluginIndex, | ||
|
@@ -16,7 +17,8 @@ | |
EffectIndex, | ||
WindowIndex, | ||
) | ||
from common.util.apifixes import getFocusedPluginIndex, getFocusedWindowIndex | ||
from common.util.apifixes import getFocusedPluginIndex, getFocusedWindowIndex,\ | ||
reset_generator_active | ||
|
||
|
||
class ActivityState: | ||
|
@@ -71,10 +73,13 @@ def _forcePlugUpdate(self) -> None: | |
else: | ||
self._effect = plugin # type: ignore | ||
|
||
@profilerDecoration("activity.tick") | ||
def tick(self) -> None: | ||
""" | ||
Called frequently when we need to update the current window | ||
""" | ||
# HACK: Fix FL Studio bugs | ||
reset_generator_active() | ||
self._changed = False | ||
if self._doUpdate: | ||
# Manually update plugin using selection | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters