I dont think GuiAPI should use the ScreenLogicalOffsets this way. Cores should be using this entirely internally -- either adjusting what they fill the framebuffer with, or communicating further data for how to display a limited section of the framebuffer offset to DisplayManager via IVideoProvider or similar but NOT via this. So why does ScreenLogicalOffsets exist? So that scripts can alter that setting. This is actually NOT A GREAT IDEA if you ask me because the same could be done via general PutSettings APIs. nevertheless, that's what we have. So anyway, I dont think when drawing via script we really need this value inspected.

This commit is contained in:
zeromus 2021-03-28 15:22:42 -04:00
parent ac349af9f5
commit 99c8e4e910
1 changed files with 0 additions and 8 deletions

View File

@ -64,14 +64,6 @@ namespace BizHawk.Client.Common
private Graphics GetGraphics(DisplaySurfaceID? surfaceID)
{
var g = GetRelevantSurface(surfaceID)?.GetGraphics() ?? Graphics.FromImage(_nullGraphicsBitmap);
var (tx, ty) = Emulator.ScreenLogicalOffsets();
if (tx != 0 || ty != 0)
{
var transform = g.Transform;
transform.Translate(-tx, -ty);
g.Transform = transform;
}
return g;
}