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

Prevent SDL Window blocking main thread during battle #220

Open
wants to merge 2 commits into
base: gdxsv-master
Choose a base branch
from

Conversation

vkedwardli
Copy link
Collaborator

During battle, make the window not resizable in macOS, and not resizable + draggable in Windows.

Long standing issue: libsdl-org/SDL#1059

one person decides to drag or resize their window, and the whole session dies, pissing off all of the players trying to play

One player (not even the host) was dragging their window in a match I had and everyone was confused as to why everyone was suddenly lagging

@inada-s
Copy link
Owner

inada-s commented Jul 18, 2023

This makes good players inconvenient, so I want a better way.

@vkedwardli
Copy link
Collaborator Author

Locking it only after if the event happens for more than 10 times or 20 times?

@inada-s
Copy link
Owner

inada-s commented Jul 19, 2023

This does not solve the problem and it would be difficult to follow the code because changes in multiple places.

Let's take a more consistent solution. ex:

  • Render while dragging (I know this is difficult with SDL2)
  • Allow moving, maximizing, resizing, and minimizing the window without title bar

@vkedwardli
Copy link
Collaborator Author

Since we are not solving the inconvenience caused by moving windows, but the bad intentional caused by players by abusing this feature. Even if we solved the Windows SDL drag window blocking, bad player can still block the game using Resizing method.

So it won’t be solvable?

@inada-s
Copy link
Owner

inada-s commented Jul 19, 2023

Like disconnection, it should be viewed as an unavoidable disturbance.
How about recording window drag and resize during a battle and sending with matching report?

@inada-s
Copy link
Owner

inada-s commented Jul 23, 2023

@vkedwardli
Copy link
Collaborator Author

Sure, will do after my Korea vacation

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