Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Facepunch.Steamworks/SteamRemoteStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,21 @@ internal override bool InitializeInterface( bool server )
SetInterface( server, new ISteamRemoteStorage( server ) );
if ( Interface.Self == IntPtr.Zero ) return false;

InstallEvents();

return true;
}

internal static void InstallEvents()
{
Dispatch.Install<RemoteStorageLocalFileChange_t>( x => OnLocalFileChange?.Invoke() );
}

/// <summary>
/// If a Steam app is flagged for supporting dynamic Steam Cloud sync, and a sync occurs, this callback will be posted to the app if any local files changed.
/// </summary>
public static event Action OnLocalFileChange;


/// <summary>
/// Creates a new file, writes the bytes to the file, and then closes the file.
Expand Down