Add SimConnect_SubscribeToSystemEvent handling#15
Merged
AussieScorcher merged 1 commit intostopbars:0.1.18from Dec 29, 2025
Merged
Conversation
Greptile Summary
Important Files Changed
Confidence score: 4/5
|
There was a problem hiding this comment.
Additional Comments (3)
-
src/SimConnect.NET/Events/SimSystemEventReceivedEventArgs.cs, line 11-12 (link)syntax: Line 11 has a trailing period after 'identifier and' in the XML comment
-
tests/SimConnect.NET.Tests.Net8/Tests/SystemEventSubscriptionTests.cs, line 31-40 (link)style: Event handler should be unsubscribed in a finally block to prevent memory leaks in case of exceptions
-
src/SimConnect.NET/SimConnectClient.cs, line 358 (link)syntax: The return type description says 'A task representing the event' but should say 'A task representing the subscription operation'
4 files reviewed, 3 comments
AussieScorcher
approved these changes
Dec 29, 2025
AussieScorcher
added a commit
that referenced
this pull request
Dec 29, 2025
* Add SimConnect_SubscribeToSystemEvent handling (#15) * feat: add system event subscription and management features in version 0.1.18 - Implemented subscription to simulator system events via `SimConnectClient.SubscribeToEventAsync`. - Added typed event handlers for frame, filename, object add/remove, and extended EX1 system events. - Introduced helper methods for managing event states: `SetSystemEventStateAsync` and `UnsubscribeFromEventAsync`. - Enhanced performance by optimizing message processing and memory allocation in SimVar setters. - Updated bundled `SimConnect.dll` to the latest SDK version. - Added tests for system event subscription and state management. --------- Co-authored-by: Eren Özdil <eozdil174@gmail.com>
This file contains hidden or 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
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.
Summary
Adds SimConnect_SubscribeToSystemEvent handling to the SimConnectClient
Usage example:
Changes Made
Additional Information
Some background on why I've implemented this:
I am a developer for a Virtual airline and have started using your library during my refactoring away from FSUIPC for Sim communication, we check for when a user has paused their sims to various actions. While implementing the new code I've noticed the only way to reliably check the pause state on MSFS is to use these Simconnect System Events. Which wasn't supported from what I could see so I decided to make a small PR to add the implementation.
Let me know if anything needs changing or if there is any points you would like to discuss.
Author Information
Discord Username: eoz.dll
Checklist: