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

The headless testing environment does not load the default config #19332

Open
2 of 5 tasks
Nabile-Rahmani opened this issue Jul 17, 2024 · 0 comments · May be fixed by #19336
Open
2 of 5 tasks

The headless testing environment does not load the default config #19332

Nabile-Rahmani opened this issue Jul 17, 2024 · 0 comments · May be fixed by #19336

Comments

@Nabile-Rahmani
Copy link
Contributor

Game or games this happens in

Unit tests :)

What area of the game / PPSSPP

When adding a display-related option, I had to move its default value assignment to a compile-time constant to please the tests.

Because it was found to be a non-standard way to add defaults to options, I dug deeper to the root cause:

Unlike SDL, the headless testing environment doesn't attempt to set the config's default values as specified in the ConfigSetting constructors, resulting in tests failing if the display option isn't set to 60.

What should happen

We need the testing environment to run the code to assign these default values (and only these, not the user config, which may break tests that assume default behaviour).

As far as I can tell, it's the only option causing breakage to the tests.

But who knows what'll happen once we read other potentially non-zero values from g_Config when tests relied on everything being zeroed-out thus far.

In any case, it sounds like an oddity that should be addressed.

Once this is done, this would allow us to move the compile-time constant back to the ConfigSetting constructor if you find it more aesthetically pleasing :p

Logs

No response

Platform

Linux / BSD

Mobile device model or graphics card (GPU)

Headless

PPSSPP version affected

master

Last working version

No response

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
hrydgard added a commit that referenced this issue Jul 17, 2024
@hrydgard hrydgard linked a pull request Jul 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant