Improve IPC Providers.

This commit is contained in:
Ottermandias 2024-04-17 18:16:48 +02:00
parent e50474f12d
commit 552338e5b5
2 changed files with 3 additions and 0 deletions

View file

@ -18,6 +18,7 @@ public sealed class IpcProviders : IDisposable, IApiService
_initializedProvider = IpcSubscribers.Initialized.Provider(pi);
_providers =
[
new FuncProvider<(int Major, int Minor)>(pi, "Glamourer.ApiVersions", () => api.ApiVersion), // backward compatibility
IpcSubscribers.ApiVersion.Provider(pi, api),
IpcSubscribers.GetDesignList.Provider(pi, api.Designs),

View file

@ -46,6 +46,8 @@ public class StateIpcTester : IUiService, IDisposable
_pluginInterface = pluginInterface;
StateChanged = Api.IpcSubscribers.StateChanged.Subscriber(_pluginInterface, OnStateChanged);
GPoseChanged = Api.IpcSubscribers.GPoseChanged.Subscriber(_pluginInterface, OnGPoseChange);
StateChanged.Disable();
GPoseChanged.Disable();
}
public void Dispose()