Skip to content

[1.4.5] Client patcher broken on Linux/Mac due to System.Drawing.Graphics ref #160

@Ristovski

Description

@Ristovski

The Windows WindowService.GetScaling() method references System.Drawing.Graphics which is unavailable on Linux/Mac dotnet:

public float GetScaling()
{
    [...]
    IntPtr hdc = System.Drawing.Graphics.FromHwnd(IntPtr.Zero).GetHdc();
    [...]
}

This breaks the client patcher:

[ModFw:Shutdown] Applying mods...
Unhandled exception. MonoMod.Utils.RelinkFailedException: MonoMod failed relinking System.Drawing.Graphics (context: System.Single ReLogic.OS.Windows.WindowService::GetScaling())
---> MonoMod.Utils.RelinkTargetNotFoundException: MonoMod relinker failed finding System.Drawing.Graphics (context: System.Single ReLogic.OS.Windows.WindowService::GetScaling())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions