Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analog inputs can cause invalid values for Display Options #125

Open
Jesright73 opened this issue Sep 19, 2023 · 0 comments
Open

Analog inputs can cause invalid values for Display Options #125

Jesright73 opened this issue Sep 19, 2023 · 0 comments
Labels
bug Something isn't working the way it should

Comments

@Jesright73
Copy link
Contributor

Jesright73 commented Sep 19, 2023

Describe the bug
Analog inputs are read as floats instead of integers in the Display Options step event, which can result in non-boolean settings having invalid values.

To Reproduce

  1. Get analog input device (joystick, touch screen)
  2. go to display settings in game
  3. Change the setting of any non-boolean (e.g. Window Size, Metroid Counter, and Controller Tips) using the analog input.
  4. Sometimes [!] appears. Doing this with Window Size can also result in bad screen scaling.

Expected behavior
Changing settings with analog should never cause invalid values.

Media
image

Platform (please complete the following information):

  • OS: Any

Game Version:
1.5.5

Additional context
Simple fix: round the analog input values in the step event of oOptionsDisplay

- input = (oControl.kRight - oControl.kLeft)
+ input = (ceil(oControl.kRight) - ceil(oControl.kLeft))
@Jesright73 Jesright73 added the bug Something isn't working the way it should label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working the way it should
Projects
None yet
Development

No branches or pull requests

1 participant