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

OpenBVE and ObjectViewer do not retain some settings #1104

Closed
soyachoin104 opened this issue Jan 1, 2025 · 8 comments
Closed

OpenBVE and ObjectViewer do not retain some settings #1104

soyachoin104 opened this issue Jan 1, 2025 · 8 comments

Comments

@soyachoin104
Copy link

I downloaded the 27th December nightly build when it came out, I noticed some settings do not stay set when I change them in-game or in ObjectViewer.

In-game settings change:

  • Number of Allowed sounds - I change to 100 but reverts to 16 when I close the game and reopen it

ObjectViewer settings change:

  • Resolution settings - I change them to 1920x1080 but they revert to 2564x1410 (my monitor resolution) when I close and reopen the program)
  • Camera controls (Backwards) - I change it to 'S' but reverts to 'W' when I close and reopen the program.

I checked the options cfg files in the C:\Users\Username\AppData\Roaming\openBVE\Settings\1.5.0 folder and they retain my preferences from previous versions of the game, but the new versions of the game and the program does not seem to recognise this?

Thanks!

@leezer3
Copy link
Owner

leezer3 commented Jan 2, 2025

The number of allowed sounds (missing newline in the options file) and the camera key issue should now be fixed.

The Object Viewer resolution settings seem to work OK for me.
If they're missing it suggests it can't write to the options file, or possibly that it's looking in the wrong place. I'll do some more digging, but can't immediately think of anything.

@leezer3
Copy link
Owner

leezer3 commented Jan 5, 2025

OK, I've found the issue with the resolution in Object Viewer- It's because you're using it in Windowed mode on a non-default DPI scaling factor.

I'm not immediately sure how to sort this one properly; It's somewhere in the innards of OpenTK. I can probably add a workaround, but it'll likely be a nasty hack and I need to do some proper testing.....

TLDR:
When we request a window, we set the actual size in pixels in the constructor.
For some reason I'm not clear of at the minute, either Windows or OpenTK is multiplying this by the scale factor. It then clamps said window size at the actual monitor resolution.
(For example, try a 200x 200 px window- It'll generate a window of 400x400px)
To make things more confusing, subsequent events actually recognise the window size correctly.

@leezer3
Copy link
Owner

leezer3 commented Jan 5, 2025

opentk/opentk#47

Looking back at things, OpenTK scaling is a mess, and I've been digging in this direction before, but clearly not with this precise issue....

@soyachoin104
Copy link
Author

Thanks so much, the build fixed many of the settings retention issues. However, I found another one

Driving mode in the game startup defaults to Arcade even if I switch it to Normal and restart the game.

Thanks again!

leezer3 added a commit that referenced this issue Jan 6, 2025
@leezer3
Copy link
Owner

leezer3 commented Jan 6, 2025

Thanks, fixed.

@BPI-919
Copy link
Contributor

BPI-919 commented Jan 7, 2025

@leezer3 I already showed You this issue in the past, you can see here: https://youtu.be/6G8m9ju7YHI?si=bgLffjqtJPpwDN38
(From 4:50). Can you please watch my recording again, the whole, at least from 4:30?
I already mentioned my issue with the savings of resolution settings of ObjectViewer & RouteViewer also there. Unfortunately I weren't able to summarise the issues I faced and showed in the video, it was my fault... therefore we had to wait until other users face the same issues I also faced. :(
Next time I will pay more attention on this.

@BPI-919
Copy link
Contributor

BPI-919 commented Jan 7, 2025

Screenshot_2025-01-07-21-40-26-022_org mozilla firefox

#1066 - Full conversation

@leezer3
Copy link
Owner

leezer3 commented Jan 8, 2025

Today's build will hopefully help with the resolution issue for Object Viewer / Route Viewer.

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

No branches or pull requests

3 participants