praydog / UEVR

Universal Unreal Engine VR Mod (4.8 - 5.4)
http://uevr.io
3.08k stars 158 forks source link

Pressing Tab on Resolution Dialogue to put in Floating Point Leads to Choosing a Resolution of 0, which Crashes UEVR.[BUG] #142

Open GeekyGami opened 9 months ago

GeekyGami commented 9 months ago

Describe the bug

Pressing Tab on Resolution Dialogue to put in Floating Point Leads to Choosing a Resolution of 0, which Crashes UEVR.

If the UEVR version or commit hash is known, submit this information.

This is the specific version that fixed the lag in Kingdom Hearts 3.

To Reproduce

Steps to reproduce the behavior: Go to Runtime. Click resolution scaling. Press tab. Press 0.

Any game will do.

Expected behavior

Being able to input a floating point value for the resolution granularly by typing it in.

Specs are irrelevant, this is not a performance issue. You cannot use a resolution scale of 0. As that is the case, it crashes.

Fixing this will require making it so that you have to press Enter for your entered value to update, and to have a catch for 0 if it's detected, to tell the user that they cannot use it, or simply to revert to the default resolution.

As floating point decimals are necessary to input resolution scaling properly, there isn't much choice but starting by pressing 0.

mrbelowski commented 9 months ago

looks like this is a more general problem with the UI. The various sliders have valid ranges specified but those ranges are not applied to values that are typed into the associated text box. I think any of the range-limited sliders can have their ranges overridden like this, I'm not sure what the behaviour of the sliders will be in cases where the text box contains a value outside their range.

If any 'on modified' handlers are ignored unless the typed-in value is within the range, it might fix this. However, this change might be quite invasive as it would need to apply to floats, ints, doubles etc

For this specific case I guess you could start by entering 1.1 into the text box, then edit the first char to make 0.1, the work up from there