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 function: window_set_display() #9155

Closed
JeffJ89 opened this issue Jan 25, 2025 · 2 comments
Closed

New function: window_set_display() #9155

JeffJ89 opened this issue Jan 25, 2025 · 2 comments
Labels
feature request New feature (or a request for one)

Comments

@JeffJ89
Copy link

JeffJ89 commented Jan 25, 2025

Is your feature request related to a problem?

Name is just a placeholder suggestion, but what I'm asking for is the ability to set which monitor the game should be run on. This is a pretty common video setting in many games nowadays and I would like to offer this as well.

Describe the solution you'd like

I'm imagining there would be a function to retrieve info about all currently connected monitors, like we currently can with all connected gamepads, and then iterate through them. We currently have stuff like window_get_width(), in this case we might be able to do something like window_get_width(arrayIndexOfAllMonitors).

So maybe something like:
window_get_displays() - Returns an array of all connected monitors

Use those array indices with functions like window_get_width(), and with this new proposed function, like
window_set_display(2) <--- This would set the game to whatever monitor is in the 2nd array index returned by window_get_displays.

These are all just suggestions of course, I don't care too much about the specific implementations, I just want the ability to detect monitors and set which one the game should go to (currently just goes to whatever Windows has as the primary)

Describe alternatives you've considered

Currently I think the only alternative would be an extension, or first grabbing the game in a windowed mode, moving it manually to another monitor, and then set it to borderless fullscreen.

Additional context

No response

@JeffJ89 JeffJ89 added the feature request New feature (or a request for one) label Jan 25, 2025
@L-Clouds
Copy link

L-Clouds commented Jan 26, 2025

There is a function to list all* connected monitors and get info about them: window_get_visible_rects
*Max. 8 monitors

With its returned info, you can move a windowed or borderless-fullscreen game to other monitors.

Still, AFAIK, there's no way to specify what monitor a game in true/exclusive fullscreen is shown on. I don't know if this is a GameMaker limitation or something system-related and outside their control.

@stuckie
Copy link

stuckie commented Jan 27, 2025

Closing as above; use window_get_visible_rects and move the window to where you need it.

@stuckie stuckie closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Team Workload Jan 27, 2025
@gurpreetsinghmatharoo gurpreetsinghmatharoo moved this from Done to Not Planned in Team Workload Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature (or a request for one)
Projects
Status: Not Planned
Development

No branches or pull requests

3 participants