diff --git a/OpenRA.Game/Graphics/CursorManager.cs b/OpenRA.Game/Graphics/CursorManager.cs index 19699aab8d..20a9320ad3 100644 --- a/OpenRA.Game/Graphics/CursorManager.cs +++ b/OpenRA.Game/Graphics/CursorManager.cs @@ -190,11 +190,17 @@ namespace OpenRA.Graphics var doubleCursor = graphicSettings.CursorDouble; var cursorSprite = cursor.Sprites[frame % cursor.Length]; var cursorSize = doubleCursor ? 2.0f * cursorSprite.Size : cursorSprite.Size; - var mousePos = isLocked ? lockedPosition : Viewport.LastMousePos; + // Cursor is rendered in native window coordinates + // Apply same scaling rules as hardware cursors + var ws = Game.Renderer.WindowScale; + if (ws > 1.5f) + cursorSize = 2 * cursorSize; + + var mousePos = isLocked ? lockedPosition : Viewport.LastMousePos; renderer.RgbaSpriteRenderer.DrawSprite(cursorSprite, mousePos, - cursorSize); + cursorSize / ws); } public void Lock() diff --git a/OpenRA.Mods.Common/Widgets/MouseAttachmentWidget.cs b/OpenRA.Mods.Common/Widgets/MouseAttachmentWidget.cs index c499da979c..4f3e19cb12 100644 --- a/OpenRA.Mods.Common/Widgets/MouseAttachmentWidget.cs +++ b/OpenRA.Mods.Common/Widgets/MouseAttachmentWidget.cs @@ -36,7 +36,12 @@ namespace OpenRA.Mods.Common.Widgets if (sprite != null && palette != null) { var directionPalette = worldRenderer.Palette(palette); - WidgetUtils.DrawSHPCentered(sprite, ChildOrigin, directionPalette, graphicSettings.CursorDouble ? 2 : 1); + + // Cursor is rendered in native window coordinates + // Apply same scaling rules as hardware cursors + var ws = Game.Renderer.WindowScale; + var scale = (graphicSettings.CursorDouble ? 2 : 1) * (ws > 1.5f ? 2 : 1); + WidgetUtils.DrawSHPCentered(sprite, ChildOrigin, directionPalette, scale / ws); } }