-
Notifications
You must be signed in to change notification settings - Fork 55
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
Simple fixes #56
Closed
Closed
Simple fixes #56
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ImTextureID could be anything (void *, uint64_t, uint_16t, GLuint, etc.) so that using reinterpret_cast / static_cast can generate warnings or errors in some compilers, depending on what the actual type of ImTextureID is. So, we resort to a C style double cast.
When a client wants to reconnect to the server, we can get to a situation where mbIsDrawing is true on the first frame. However, it will work on subsequent frames.
… nullptr before destroy Otherwise we may end up in situations where ImGui::DestroyContext fails because it is not null. This pointer was set to an external content, so it is safe to do so, and should not leak.
Thank you.
I will try to take a look at both changelist this weekend.
…On Thu, Apr 18, 2024 at 7:20 PM Pascal Thomet ***@***.***> wrote:
Hello,
In this pull request, I provide some simple fixes that I added when
working on netImgui.
The commit messages should be sufficient to explain the content:
ea331b8
<ea331b8>
Add missing includes
5fa7511
<5fa7511>
Server init: correct fail message condition
There was a probable typo in the code
02a7d8a
<02a7d8a>
Rework ImTextureID casts: added ToImTextureID helper
ImTextureID could be anything (void *, uint64_t, uint_16t, GLuint, etc.)
so that using reinterpret_cast / static_cast can generate warnings or
errors in some compilers,
depending on what the actual type of ImTextureID is. So, we resort to a C
style double cast.
2279603
<2279603>
Use ImWChar for character (handle cases where we use ImWchar32)
(the compilation failed when using ImWchar32)
fa62011
<fa62011>
NetImGui_Api / NewFrame: if (client.mbIsDrawing) return false
When a client wants to reconnect to the server, we can get to a situation
where mbIsDrawing is true on the first frame. However, it will work on
subsequent frames.
7c4fd3b
<7c4fd3b>
Client::Uninitialize(): set mpBGContext->IO.BackendRendererUserData =
nullptr before destroy
Otherwise we may end up in situations where ImGui::DestroyContext fails
because it is not null.
This pointer was set to an external content, so it is safe to do so, and
should not leak
------------------------------
You can view, comment on, or merge this pull request online at:
#56
Commit Summary
- ea331b8
<ea331b8>
Add missing includes
- 5fa7511
<5fa7511>
Server init: correct fail message condition
- 02a7d8a
<02a7d8a>
Rework ImTextureID casts: added ToImTextureID helper
- 2279603
<2279603>
Use ImWChar for character (handle cases where we use ImWchar32)
- fa62011
<fa62011>
NetImGui_Api / NewFrame: if (client.mbIsDrawing) return false
- 7c4fd3b
<7c4fd3b>
Client::Uninitialize(): set mpBGContext->IO.BackendRendererUserData =
nullptr before destroy
File Changes
(10 files <https://github.com/sammyfreg/netImgui/pull/56/files>)
- *M* Code/Client/NetImgui_Api.h
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-83d4102052a7ed60230e7d919c68184c57b2e3166279504c0afc4d9536980757>
(13)
- *M* Code/Client/Private/NetImgui_Api.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-181eb647d8cbab9dae762d90b047ebf8b19c3b8638205b016893bcf9a63901d8>
(7)
- *M* Code/Client/Private/NetImgui_Client.h
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-47e62f690134ad6754db5124fd1fa55a568afca2a3dc6d848b720c126efb0a3f>
(2)
- *M* Code/Client/Private/NetImgui_NetworkPosix.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-c09fc3359a3b6379dca5d10d3f1a151ae6d15b1b339b63640044600e29456994>
(1)
- *M* Code/Sample/SampleBackground/SampleBackground.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-1fef980f9d4c38953f71cadd7f9350895c58f96da50b0afb49786f5a087318bc>
(7)
- *M* Code/Sample/SampleTextures/SampleTextures.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-795ef82a7eabe58697f059822b46d36a4198999933a272e609529e1544fd6ed8>
(16)
- *M* Code/ServerApp/Source/NetImguiServer_Network.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-d29624e1c2f682ee0d3bed884baa0501fe4486fc5c7740af7e0a9125aef7a1a3>
(2)
- *M* Code/ServerApp/Source/NetImguiServer_RemoteClient.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-b9e3c0ac9faa38471efc5a760ddaf397d1d945b39b3e7f2dadff5f2e0e055acc>
(3)
- *M* Code/ServerApp/Source/NetImguiServer_UI.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-743fbb4dec7fc225125958ca059a549556536b93205466257aaf7b8d6fb003ed>
(2)
- *M* Code/ServerApp/Source/Sokol/NetImguiServer_App_Sokol.cpp
<https://github.com/sammyfreg/netImgui/pull/56/files#diff-ac058d04e1ac811d91e109b2a8e175e216095fadbbc421b579037af7e1db8b4a>
(2)
Patch Links:
- https://github.com/sammyfreg/netImgui/pull/56.patch
- https://github.com/sammyfreg/netImgui/pull/56.diff
—
Reply to this email directly, view it on GitHub
<#56>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AESBPY3Q5HAJNS4WJ74ZUIDY6BIMZAVCNFSM6AAAAABGOFPU6WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TCNZVGQ3TKOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
sammyfreg
added a commit
that referenced
this pull request
May 27, 2024
* Added 'TakeOver' Option NetImguiServerApp can now forcefully take over a connection to a client already connected to another server. A button with 'TakeOver' appear in the Client List letting the user connect despite an active connection. * Small fixes Small fixes based on PR #56 by GitHub user @pthom * Updated to Dear ImGui 1.90.6 - Server updated to latest Dear Imgui - Added compatibility tests up to that version * API version update for release
I ended up applying some of your fixes in 637411b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
In this pull request, I provide some simple fixes that I added when working on netImgui.
The commit messages should be sufficient to explain the content:
ea331b8 Add missing includes
5fa7511 Server init: correct fail message condition
There was a probable typo in the code
02a7d8a Rework ImTextureID casts: added ToImTextureID helper
ImTextureID could be anything (void *, uint64_t, uint_16t, GLuint, etc.)
so that using reinterpret_cast / static_cast can generate warnings or errors in some compilers,
depending on what the actual type of ImTextureID is. So, we resort to a C style double cast.
2279603 Use ImWChar for character (handle cases where we use ImWchar32)
(the compilation failed when using ImWchar32)
fa62011 NetImGui_Api / NewFrame: if (client.mbIsDrawing) return false
When a client wants to reconnect to the server, we can get to a situation where mbIsDrawing is true on the first frame. However, it will work on subsequent frames.
7c4fd3b Client::Uninitialize(): set mpBGContext->IO.BackendRendererUserData = nullptr before destroy
Otherwise we may end up in situations where ImGui::DestroyContext fails because it is not null.
This pointer was set to an external content, so it is safe to do so, and should not leak