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

[New Feature] Integer scaling and super resolution #485

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

donmor
Copy link

@donmor donmor commented Jun 17, 2022

Former issue #483 .
This PR added a feature that making it able to do integer scaling, to achieve "pixel perfect". When option Settings > Video Integer Scaling is on, the core renderer detects the window size and scale the original video to the max size while keeping pixel-perfect. An entry added in settings.
2022-06-17 21-42-50
2022-06-17 21-55-38

@lgtm-com
Copy link

lgtm-com bot commented Jun 17, 2022

This pull request introduces 1 alert when merging 204b64a into 500c8ba - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@donmor donmor changed the title [New Feature] Integer scaling [New Feature] Integer scaling and super resolution Jun 17, 2022
@donmor
Copy link
Author

donmor commented Jun 18, 2022

Update: Super resolution
Makes the video horizontally stretched when Video Super Resolution enabled. Can be affected by Video Integer Scaling. The menu will have a different behavior to work properly under super resolutions.
2022-06-18 01-12-04
2022-06-18 01-02-54
2022-06-18 13-54-41

@donmor
Copy link
Author

donmor commented Jun 18, 2022

Update: Added support to unicode font. A unifont.png need to be placed in assets directory. To generate unifont.png, fetch "Plane 0 Chart" in BMP format from http://unifoundry.com/unifont/index.html, then make it reversed and saved as PNG.
2022-06-18 22-34-53

@donmor
Copy link
Author

donmor commented Jun 18, 2022

Update: Refactorred Super Resolution to Aspect Correction. Once set to the aspect ratio of your monitor, it'll always keep the correct video aspect ratio, despite what resolution is in use.

@donmor
Copy link
Author

donmor commented Jun 25, 2022

Update: Nowadays people are usually not willing to change their resolution once a neat one has been set, and the largest resolution is not always best (especially for CRTs). This commit makes Ludo use current desktop resolution when entering full-screen mode.

@flexiondotorg
Copy link

@donmor That last commit gold ⭐ Ludo changes the resolution from 1920x1080 to 1920x1200 when connected to my capture card, which introduces screen clipping and refresh rate desync. Thanks for the patch.

@kivutar
Copy link
Member

kivutar commented Sep 25, 2022

But this last commit breaks full screen on OSX

@donmor
Copy link
Author

donmor commented Sep 26, 2022

But this last commit breaks full screen on OSX

Hmmmmmm... Maybe a macro.could help (does go have macros?) or a statement block?

@kivutar
Copy link
Member

kivutar commented Sep 27, 2022

I think it's also likely to break fullscreen elsewhere. If I recall correctly API of GLFW wants a monitor to be passed to achieve full screen.

@donmor
Copy link
Author

donmor commented Sep 30, 2022

Gosh I've not even had a mac and my windows pc's wonky :(
Better to make the last patch a linux-only feature, until I have a mac

@donmor
Copy link
Author

donmor commented Mar 4, 2023

Finally I managed to fix the fullscreen mode on linux, and'll test on windows later. So does anyone have a mac here?

@donmor
Copy link
Author

donmor commented Mar 4, 2023

Okay please wait for a while before I put some comments in code :)

@donmor
Copy link
Author

donmor commented Mar 4, 2023

BTW I think it'd be better to use unicode font glyph instead ascii, as the first step to making i18n stuff.

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 this pull request may close these issues.

3 participants