mirror of
https://github.com/OpenEmu/OpenEmuKit.git
synced 2025-11-01 11:08:14 +00:00
fix: Frame may be offset in parent window and not at { 0, 0 }
This commit is contained in:
@@ -169,8 +169,8 @@
|
||||
|
||||
screenRect.size.width *= scale;
|
||||
screenRect.size.height *= scale;
|
||||
screenRect.origin.x = CGRectGetMidX(frame) - CGRectGetWidth(screenRect) / 2;
|
||||
screenRect.origin.y = CGRectGetMidY(frame) - CGRectGetHeight(screenRect) / 2;
|
||||
screenRect.origin.x = CGRectGetMidX(frame) - frame.origin.x - CGRectGetWidth(screenRect) / 2;
|
||||
screenRect.origin.y = CGRectGetMidY(frame) - frame.origin.y - CGRectGetHeight(screenRect) / 2;
|
||||
|
||||
location.x -= screenRect.origin.x;
|
||||
location.y -= screenRect.origin.y;
|
||||
|
||||
Reference in New Issue
Block a user