-
Notifications
You must be signed in to change notification settings - Fork 48
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
FF7: Added experimental 16:10 support #608
Conversation
Thanks for this PR! @CosmosXIII @tangtang95 can you please review? |
It seems a good starting point. But please move the override of wide variables to the Then there are also other global variables that could be overwritten in the Overall I think it is ok for now |
If you are referring to these globals:
I don't really understand how these values are calculated. I thought that the first one might be I will make the other changes you mentioned in the meantime. |
More or less, that is how you calculate it. But I don't remember where those fixed numbers came from. Either I tweaked it to fix something or I tweaked the wide variables in For now just ignore the fixed numbers |
@dotaxis I think that here https://github.com/julianxhokaxhiu/FFNx/blob/master/src/gl/special_case.cpp#L74C58-L74C58 we need to use a new variable that is the aspect ratio in float. By default it is |
Right. I did have something there in my initial draft but I forgot to fix it when I got ready for a PR. Will fix. |
Ok, for me the PR is good now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking more carefully at the PR and I'd like not to introduce another flag for controlling Widescreen. We already have aspect_ratio
which is enough.
Therefore I propose the following changes:
- Remove
widescreen_ar
( flag, toml section, etc. ) - Add a new option 3 for
aspect_ratio
- Update the FFNx.toml to something like this:
#[ASPECT RATIO]
# Preserve original game aspect ratio of (4:3) by adding black bars on the left and right side (if needed)
# When off the game will be stretched to fit the window's aspect ratio; Be aware the game may look wrong though.
# 0: Preserves original game aspect ratio of (4:3) by adding black bars on the left and right side (if needed)
# 1: Stretched to fit the window's aspect ratio
# 2: 16:9 aspect ratio mode without stretching the image
# 3: 16:10 aspect ratio mode without stretching the image
#~~~~~~~~~~~~~~~~~~~~~~~~~~~
aspect_ratio = 0
- Update the constant
AR_WIDESCREEN
toAR_WIDESCREEN_16x9
- Add a new constant
AR_WIDESCREEN_16x10
- Use this constant as a discriminator in the new if condition where 16:10 values are set
This will keep the code cleaner, scalable and more robust, as well as simplify the addition of this option on 7th later.
Thank you in advance
I think this was the previous solution proposed in Discord, but this required to change also all the if statement where |
Yeah, I think the current solution is much cleaner than having a fourth aspect ratio because of the way FFNx handles 16:9 (many different checks to the value of However, it may work to use a That said, I think this is not really scalable either way since 16:10 is pretty much the only other widescreen resolution that we can reasonably support. I can try out the changes suggested by @julianxhokaxhiu, but I'm not sure if the end result is actually going to be cleaner than this. I'll try. |
Yeah I know that the PR may seem "heavier" on the diff side of things, but it will feel much more lightweight as if we'll need to cover more aspect ratios in the future ( who knew we would even be discussing native 16:10 for example ) we can simply use one flag to rely on that info instead of two, which one depends on the other. I'd prefer to streamline the approach even if we have to "bulk rename" a constant everywhere basically.
Thanks a lot, appreciated |
I have come up with what I believe is an acceptable, scalable solution. Please review. The only caveat here is that mods that read aspect_ratio from the toml will think the game is running at 4:3 until they are updated. This may actually be better than the previous solution because now UI elements aren't getting cut off the edges of the screen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allright, the PR LGTM :) Thanks @dotaxis!
@tangtang95 @CosmosXIII if you can have a final look I'd appreciate. By looking at the code I can't notice any particular drawback, on the opposite site the code can scale accommodating even new ARs eventually. Any drawbacks I can't see?
Yeah, seems good to me. In this way, it will be simpler for user and also if we want to extends 7th graphics driver config |
It's better like this, so mods will have to be updated in order to support 16:10. |
@julianxhokaxhiu shouldn't this be a Line 69 in e7aef84
Line 121 in e7aef84
Edit: Maybe not, but I'm wondering what the reason for the type change is. |
The bool type is anyway an integer in memory, and it uses 4 bytes. The current type will allow us to scale this flag eventually to a third or forth state in the future if needed :)
Thanks a lot to you for reviewing! |
That makes sense. Thanks for explaining. And thank you both for helping me get this up to spec! |
Thanks a lot @dotaxis great PR! Looking forward to next ones :) |
Summary
Crops 16:9 aspect ratio horizontally to support 16:10. Adds a new entry to the FFNx.toml to differentiate between 16:9 and 16:10.
There may be a much better way to do this, but I wanted to at least have a discussion about it. Mod authors will need to add support for this if it reaches production.
Motivation
The Steam Deck uses a resolution of 1280x800, and this will remove the black bars on the top and bottom of the screen.
ACKs