mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 16:23:50 +02:00
fix: overlay scaling issue
This commit is contained in:
@@ -24,17 +24,26 @@ namespace VRCX
|
||||
private int _width;
|
||||
private int _height;
|
||||
|
||||
public OffScreenBrowserLegacy(string address, int width, int height)
|
||||
: base(
|
||||
address,
|
||||
new BrowserSettings()
|
||||
{
|
||||
DefaultEncoding = "UTF-8"
|
||||
}
|
||||
)
|
||||
public OffScreenBrowserLegacy(string address, int width, int height, IRequestContext requestContext = null)
|
||||
: base(address, automaticallyCreateBrowser: false)
|
||||
{
|
||||
_paintBufferLock = new ReaderWriterLockSlim();
|
||||
|
||||
var windowInfo = new WindowInfo();
|
||||
windowInfo.SetAsWindowless(IntPtr.Zero);
|
||||
windowInfo.WindowlessRenderingEnabled = true;
|
||||
windowInfo.SharedTextureEnabled = false;
|
||||
windowInfo.Width = width;
|
||||
windowInfo.Height = height;
|
||||
|
||||
var browserSettings = new BrowserSettings()
|
||||
{
|
||||
DefaultEncoding = "UTF-8",
|
||||
WindowlessFrameRate = 24
|
||||
};
|
||||
|
||||
CreateBrowser(windowInfo, browserSettings, requestContext);
|
||||
|
||||
Size = new System.Drawing.Size(width, height);
|
||||
RenderHandler = this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user