Skip to content

Avalonia UI switch - #372

Merged
benaclejames merged 28 commits into
masterfrom
refactor/avalonia
Sep 7, 2026
Merged

Avalonia UI switch#372
benaclejames merged 28 commits into
masterfrom
refactor/avalonia

Conversation

@benaclejames

Copy link
Copy Markdown
Owner

No description provided.

benaclejames and others added 27 commits September 5, 2026 01:46
… code. Remove windows dependencies. Fix up various cross platform issues. First party linux support with associated libs. ARM build support. Consider ethernet frame size in udp max transfer unit. Implement (jank) chunking in sandboxclient senddata byte array instead of only ipcpacket
…ers to build all versions now and these wouldn't work for Windows. Remove need for vcruntime too since we no longer use winui3
…eardown. Fix up horizontal scroll bar in output page obscuring latest log line and utilize autohiding. Improve autoscroll reliability.
…ere "no modules installed" would persist after install
…unifiedlibmanager to separate out sandbox handling
…h app would crash due to missing file. reinit modules after local module install
…duce stuttering. Rebuild fti_osc incl macos arm64
@benaclejames

Copy link
Copy Markdown
Owner Author

(I don't expect you all to read all the code, but if you could just test the avalonia branch on steam, thatd be much appreciated)

@lumeyisnotyou lumeyisnotyou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

used avalonia branch for forever, works good!!!!

@dfgHiatus

Copy link
Copy Markdown
Collaborator

In my use of things so far, things have been stable. But I'll take a look at the code here too, thanks for all of your work!

@RantiMess RantiMess left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still havent tested on linux but ye

@dfgHiatus dfgHiatus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

And here we go. Mainly nits, I think this might need to be chopped into smaller PRs for a more comprehensive review.

}*/

AvatarConfigFile avatarConfig = null;
if (string.IsNullOrEmpty(VRChat.VRCOSCDirectory) || !Directory.Exists(VRChat.VRCOSCDirectory))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it make more sense to return an "empty" avatar config over a null object?

{
_loggerFactory = factory;
_logger = factory.CreateLogger<UnifiedLibManager>();
_moduleLogger = factory.CreateLogger("\0VRCFT\0");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What role does the \0 have here?

}
_logger.LogDebug("Thread for {module} ended", module.GetType().Name);
Active = false,
Name = "No Modules Loaded",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

User facing strings need to be localized.

_logger.LogWarning($"Module: {moduleName} failed to shut down. Killing its thread.");
module.UpdateThread?.Interrupt();
}
var moduleName = module.ModuleInformation?.Name ?? module.ModuleClassName ?? "Unknown";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

User facing strings need to be localized.

if (LoadedModulesMetadata.Count > 0
&& !LoadedModulesMetadata[0].Active
&& (LoadedModulesMetadata[0].Name == "No Modules Loaded"
|| LoadedModulesMetadata[0].Name == "Initializing Modules..."))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

User facing strings need to be localized.

{
if (_linkedToken.IsCancellationRequested || _recvSocket is not { IsBound: true })
{
await Task.Delay(10, _stoppingToken);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this delay necessary?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This may be out of the scope of this PR, but this constructor fails to detect if an avatar emulator is in use. See my blog post about this - https://docs.babble.diy/blog/vrcft-avalonia#misc. This code after the game path check is roughly what is needed:

 /* 4) Edge case! Here, if:
    A) VRChat was NOT detected OR
    B) VRChat was detected, BUT it's NOT running
    An avatar emulator might be trying to use us!
    For reference, here is what an emulator path looks like on MacOS. Gotta have variety:
    /Users/[user]/.local/share/VRChat/vrchat/OSC/
    We need to try this first before defaulting to the game path */
    string[] possibleEmulatorPaths =
    [
        Path.Combine(home, ".local", "share", "VRChat")
    ];
    var emulatorPath = Array.Find(possibleEmulatorPaths, Directory.Exists);
    var isVRChatInactive = string.IsNullOrEmpty(vrChatPath) || !IsVrChatRunning();

    if (!string.IsNullOrEmpty(emulatorPath) && isVRChatInactive)
    {
        // Construct the path to the avatar emulator's data folder
        VRCOSCDirectory = Path.Combine(emulatorPath, "vrchat", "OSC");
    }

Comment thread VRCFaceTracking.ModuleProcess/ModuleAssembly.cs
Comment thread VRCFaceTracking/Services/Logging/BufferLogger.cs
Comment thread VRCFaceTracking/Program.cs
@benaclejames
benaclejames merged commit e1c9dbf into master Sep 7, 2026
1 check passed
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.

4 participants