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

Borderless Fullscreen Implementation #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KaleiAlma
Copy link

Added new API for changing window mode:

-- int, int, bool, int
lstg.VideoModeWindowed(width, height, vsync, monitor_index)
-- int, int, bool
lstg.VideoModeFSExclusive(width, height, vsync)
-- int, int, bool, int
lstg.VideoModeFSBorderless(width, height, vsync, monitor_index)

Note that system monitor indexes will not always be in the same as the order used by LuaSTG. Perhaps that could be looked into?

lstg.ChangeVideoMode() has stayed compatible with older revisions (I saw there were changes made a while back, but they were reverted at some point).

@Demonese
Copy link
Contributor

Fullscreen mode has been managed by the engine. Maybe you didn't read the changelog of v0.20?
Canvas Mode Update

@KaleiAlma
Copy link
Author

There doesn't seem to be an API to select which one is preferred, leading some developers to be dissatisfied with the implementation (as they receive Exclusive when Borderless is preferred), and denying the option to implement a settings menu to allow users to change between fullscreen modes as they wish.

Besides, I couldn't find a point where Borderless fullscreen was properly implemented. Borderless fullscreen more closely resembles Windowed mode than Exclusive fullscreen (Borderless fullscreen is actually just a full-screen window with WS_POPUP style, and the swapchain must not be set to fullscreen).

Lastly, I saw you changed the behavior of lstg.ChangeVideoMode() in 677f56e, but it got reverted in 934557d. I believe it'd be easier to use separate functions for this new API, and lstg.ChangeVideoMode() could stay for backwards-compatibility.

@Demonese
Copy link
Contributor

Demonese commented Sep 26, 2024

After a long period of thinking and testing, I designed a new set of APIs that are more scalable.

#38

It still lacks explicit config of exclusive fullscreen and related display mode (resolution, refresh rate, etc.). I'm in discussions with other developers about further development.

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.

2 participants