-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix GUI scaling #4
Comments
Mainly creating issue to keep notes here for later, I might try programming that in a week or two, (alongside with converting widescreen fix to loadable dll, as version detection currently used in other things, like autosplitter, is based on exe MD5 sum) |
https://github.com/ThirteenAG/Ultimate-ASI-Loader should make it easy in that case unless you really need it to be one dll. |
I kinda already done something like original WormKit (haven't yet published that, only internal development on Discord for now), a launcher that loads all |
I managed to make widescreen fix in a form of loadable dll module, but it needs original .exe to work (version is checked by executable hash) |
Finding float ratio43 = 4.0f / 3.0f;
float ratioWanted = gameConfig.getWidth() / gameConfig.getHeight();
// is new resolution wider than 4:3?
if (ratio43 < ratioWanted)
{
// make UI shorter in X axis
float ratio = ratio43 / ratioWanted * 0.0015625f; // 0.0015625 is magic
// replace original magic value wiith calculated one
replaceMemory(addressX, ratio);
}
else
{
// make UI shorter in Y axis
float ratio = ratioWanted / ratio43 * 0.0020833334f; // 0.0020833334 is magic
// replace original magic value wiith calculated one
replaceMemory(addressY, ratio);
} |
There should be one float
0.0015625
(CD CC CC 3A
) in exe that controls GUI scaling . When set to half of the original value~0.0007625
the GUI and menus are centered and taking half of the screen on X axis.Problem: how to decide correct value for widescreen
(4/3)*(21/9)*0.0015625 // for 21/9 screens
Offsets:
Example with 21:9 widescreen fix and the float set to
0.0007625
:The text was updated successfully, but these errors were encountered: