Skip to content

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.

@RulHolos
Copy link

Hi, I'm reopening this conversation to ask where this feature support is at?

A lot of the western community is asking for borderless fullscreen in Sub, alongside the current exclusive fullscreen and windowed modes.
I see you tried implementing something similar a while ago, in LuaSTG/LuaBinding/modern/Window.cpp, but I don't think it's functional yet, since any attempts I made at using this failed or did weird visual issues with the window.

Are you planning to add a proper borderless fullscreen mode in the near future?

@KaleiAlma
Copy link
Author

I mean, at this point you'd probably need to make an updated PR since Sub's codebase has changed a lot since I submitted this one, and it's probably no longer compatible. I'll just close this PR for that reason, but I don't think it'll lock the thread, and @Demonese should still be able to reply.

@KaleiAlma KaleiAlma closed this Oct 23, 2025
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