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

Keyboard resize fix #341

Merged
merged 4 commits into from
Oct 2, 2023
Merged

Keyboard resize fix #341

merged 4 commits into from
Oct 2, 2023

Conversation

Spodi
Copy link
Contributor

@Spodi Spodi commented Sep 17, 2023

Use the function that was already there for the message queue and just run dxgi.run_one_game_iter() in a loop. This should be more in line with how this works in SDL/OpenGL.

Fixes bugged (jittery) resize/move with keyboard through the window menu. Although the game pauses when moved/resized or the window menu is open (also like in SDL/OpenGL).

Before:
https://github.com/Kenix3/libultraship/assets/962946/c2e9f37c-31f8-4d32-ad3e-0f595faf40c8

After the changes:
https://github.com/Kenix3/libultraship/assets/962946/d6b3afdd-a53a-4771-a1e5-ea2c098ae5f8

@Spodi Spodi marked this pull request as ready for review September 17, 2023 18:10
@Spodi
Copy link
Contributor Author

Spodi commented Sep 18, 2023

I can do a follow up if it is wished that the game keeps running like before. That however brings the laggy/stutter move/resize back. (Although not that back and forth with keyboard this fixes!)

Copy link
Owner

@Kenix3 Kenix3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally am fine with the semantics change, especially given this is how it works on OpenGL. The code changes look reasonable.

Will leave this up for a bit to see if anyone has a comment.

@Spodi Spodi closed this Sep 21, 2023
@Spodi Spodi reopened this Sep 21, 2023
@Spodi
Copy link
Contributor Author

Spodi commented Sep 21, 2023

WM_ENDSESSION: If wParam is FALSE, the application should not shut down.

Hm I think I need to change it so it only closes on true.

And sry I accidentally tapped "close PR" while typing this on my phone 😑

@Kenix3
Copy link
Owner

Kenix3 commented Sep 26, 2023

Can you rebase on the latest master? Thankyou.

Use the function that was already there for the message queue and just run dxgi.run_one_game_iter() in a loop. This should be more in line with how this works in SDL/OpenGL.

Fixes bugged (jittery) resize/move with keyboard through the window menu. Although the game pauses when moved/resized or the window menu is open (also like in SDL/OpenGL).
@Spodi
Copy link
Contributor Author

Spodi commented Sep 26, 2023

Can you rebase on the latest master? Thankyou.

Done

@Kenix3 Kenix3 merged commit 0099c48 into Kenix3:main Oct 2, 2023
4 checks passed
@Spodi Spodi deleted the keyboard-resize-fix branch October 3, 2023 09:36
KiritoDv pushed a commit to KiritoDv/libultraship that referenced this pull request Oct 6, 2023
* Move run_one_game_iter() out of WM_PAINT

Use the function that was already there for the message queue and just run dxgi.run_one_game_iter() in a loop. This should be more in line with how this works in SDL/OpenGL.

Fixes bugged (jittery) resize/move with keyboard through the window menu. Although the game pauses when moved/resized or the window menu is open (also like in SDL/OpenGL).

* Fixed game never stopped running after last commit

* Attempt to gracefully close on logout

* Only close if endsession is not canceled
Spodi added a commit to Spodi/libultraship that referenced this pull request Nov 12, 2023
This seems to have caused a discrepancy in DPI awareness and therefore ImGUI does not use the whole window.
Kenix3 pushed a commit that referenced this pull request Nov 14, 2023
This seems to have caused a discrepancy in DPI awareness and therefore ImGUI does not use the whole window.
briaguya-ai pushed a commit to briaguya-ai/libultraship that referenced this pull request Nov 19, 2023
This seems to have caused a discrepancy in DPI awareness and therefore ImGUI does not use the whole window.
Kenix3 pushed a commit that referenced this pull request Nov 19, 2023
This seems to have caused a discrepancy in DPI awareness and therefore ImGUI does not use the whole window.

Co-authored-by: Spodi <spodi2290@aol.com>
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