-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Add multi-display device support #8072
base: master
Are you sure you want to change the base?
Conversation
Getter And Setter Defenition Setting File Reader And Writer Updated
Changing SDL_CreateWindow to process monitor coordinates
- Adding Display Monitor Button - Adding Filler Image to fill 6th Empty Space
Hi @MaMadDl , can you please explain what problem this pull request solves? |
Hi @ihhub |
Is this only a windows feature, or does this also work for MacOS, Linux (both X11 and Wayland?) |
It should cause we are using SDL to handle monitor coordinates and SDL handles different window systems |
Hi @MaMadDl , what do you mean I can't change it if it is possible to drag a window in between monitors? I'm just trying to understand the problem before trying to analyze a solution for it. Could you also elaborate "the Ctrl+Alt+WinKey doesnt always work"? In which cases it works and in which it doesn't? |
when you are in fullscreeen (and you want to play in fullscreen not windowed) game is pretty much stuck on the first monitor (primary monitor) connected. if you got a second monitor try this for yourself. try to open the game on fullscreen on your second (non-primary monitor) |
[-Wreorder-ctor] and [-Werror=reorder]
Compiled with C5038 enabled as error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/1)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Mr-Bajs on Ubuntu 20.04 |
include <SDL_video.h> for analyzer
c866dc5
to
53b5b46
Compare
Hi @zenseii the error happens because SDL trying to render on a display that does not exists. because this could happen in any stage of the game and not just in options this bug is not exclusive only to multi-display setups and could happen on single displays as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/1)
Hi @zenseii currently this index is not being saved. so on rebooting the game, it will start on original display.
Also this error is handled. |
20338fc
to
89b9900
Compare
26ff1c8
to
9382f10
Compare
9382f10
to
222d1ad
Compare
Hi, @MaMadDl. I tested the latest commits and the only issue I could find now is that whenever I start the app the resolution is set to 640x480, even if I change it to something like 1920x1080 before closing the app. I believe we need to save the new resolution when closing the app. |
Hi @zenseii |
@MaMadDl. I've done a clean rebuild and made some tests on the latest commit. I managed to trigger an assertion however it is pretty much an edge case, but it does help clarify the bug I encountered earlier. Basically you need to display the game on the 2nd extended monitor and set a resolution that is higher than your primary resolution supports. Then disconnect the video cable while the app is running. This triggers the assertion in screen.cpp line 1378. As I said this is kind of an edge case. That brings us to the previous bug I described about the resolution not changing from 640x480. If you do the above, or if you end the app on the second monitor with an unsupported resolution for the primary monitor and disconnect the 2nd monitor, then when you restart fheroes2 the resolution will be set to 640x480, which is fine. The problem is that you cannot change this resolution unless you click on the monitor button and the screen flashes for a brief moment. This is what I show in this video: 2024-04-18.15-08-41.mp4 |
Adding Multi Monitor Support
Tested on Windows (Win 11)