Closed Dorus closed 3 months ago
I'm afraid I don't know how the InputSystem is supposed to work either. If you switch to or merge 47c67617, that particular version of #178 should go away, but I still have crashes/hangs with that code. On the other hand, if there's significantly fewer crashes, we should merge it anyway. (The potential advantage of 47c67617 is that it reverts 5676ce7, which I never liked.)
I have no sense of whether it's an improvement because I can never tell whether my computer's in "five crashes in fifteen minutes" mode or "one crash in fifteen hours" mode.
Do you have any Pr for those changes, or are you still working on them? Indeed reverting https://github.com/shpaass/yafc-ce/commit/5676ce7ac9e6285c09c0b95de30dbe60856acacd seems to remove the offending LoC i was looking at here.
I just had an error pop up, and after that, YaFC could was no longer responsive. The line
if (inputSystem == null) { return; }
inyafc-ce\Yafc.UI\Core\Ui.cs:70
always returns false. All windows in ActiveInputSystem had.active
== false.A possible solution would be to change line 28 to
public static InputSystem? ActiveInputSystem => windows.Values.FirstOrDefault(w => w.active)?.InputSystem ?? windows.Values.FirstOrDefault()?.InputSystem;
to ensure there's always an inputsystem. But i'm not entirely sure on the expected working of the input system. @DaleStan .