MBS Overlay center on screen

Hi all, I am trying to use MBS overlay to center an image used as a splash/loading image on app open. Should be pretty straight forward, but have not had luck. It seemed to work before but then I changed the zoom settings on my laptop I think and started opening slightly to the top left corner. Any advice greatly appreciated!

splashOverlay.create

'set picture and mask 
//new picture
p = new Picture(128,150,32)

//picture and it's mask
dim pg as Graphics = p.Graphics
dim mg as Graphics = p.mask.Graphics

mg.ForeColor = &cFFFFFF
mg.FillRect 0, 0, p.Width, p.Height

Dim iconPict As Picture
Dim iconMask As Picture

Dim mbPict As MemoryBlock
Dim mbMask As MemoryBlock


If APP.IsLite = False Then //regular 
  mbPict = APP.streetImage
  
Else
  mbPict = App.StreetLiteImage
end

mbMask = App.StreetImageMask

iconPict = Picture.FromData( DecodeBase64( mbPict ) ) 
iconMask = Picture.FromData( DecodeBase64( mbMask ) ) 

pg.DrawPicture IconPict,0,0
mg.DrawPicture IconMask,0,0


'create new overlay
o=new MyOverlay( (Screen(0).Width - 128)/2 , (Screen(0).Height - 150)/2 ,128,150)

'apply picture to overlay
o.Pict = p

updateBar

o.Show
timer1.Mode=2

Mac? Win?

For Windows coordinates are passed to OS as is.
So for high DPI, you need to multiply them yourself with factor.

[quote=424930:@Christian Schmitz]For Windows coordinates are passed to OS as is.
So for high DPI, you need to multiply them yourself with factor.[/quote]

Thanks Christian. It is Windows. Really surprised I’ve only just noticed that now, I wonder what other images are all wonky on my apps. Anyway, fixed by multiplying the overlay width and height by TrueWindow.ScaleFactor.

o=new MyOverlay( TrueWindow.ScaleFactor * (Screen(0).Width - 128)/2 , TrueWindow.ScaleFactor * (Screen(0).Height - 150)/2 ,128,150)