diff --git a/OpenRa.Game/Graphics/Viewport.cs b/OpenRa.Game/Graphics/Viewport.cs index d35b354e19..26ea5204ac 100644 --- a/OpenRa.Game/Graphics/Viewport.cs +++ b/OpenRa.Game/Graphics/Viewport.cs @@ -51,7 +51,9 @@ namespace OpenRa.Game.Graphics foreach (Region region in regions) region.Draw(renderer); - cursorRenderer.DrawSprite(cursor.GetSprite((int)cursorFrame), mousePos + Location - cursor.GetHotspot(), 0); + + var c = (Game.worldRenderer.region.Contains(mousePos)) ? cursor : Cursor.Default; + cursorRenderer.DrawSprite(c.GetSprite((int)cursorFrame), mousePos + Location - c.GetHotspot(), 0); cursorRenderer.Flush(); renderer.EndFrame(); diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index 012892877c..a759587ef0 100755 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -6,9 +6,6 @@ using System.Runtime.InteropServices; namespace OpenRa.Game { - using GRegion = OpenRa.Game.Graphics.Region; - - class MainWindow : Form { readonly Renderer renderer; @@ -17,9 +14,10 @@ namespace OpenRa.Game static Size GetResolution(Settings settings) { - Size desktopResolution = Screen.PrimaryScreen.Bounds.Size; + var desktopResolution = Screen.PrimaryScreen.Bounds.Size; - return new Size(settings.GetValue("width", desktopResolution.Width), + return new Size( + settings.GetValue("width", desktopResolution.Width), settings.GetValue("height", desktopResolution.Height)); } @@ -51,8 +49,8 @@ namespace OpenRa.Game UiOverlay.ShowUnitDebug = settings.GetValue("udebug", false); UiOverlay.ShowBuildDebug = settings.GetValue("bdebug", false); - Game.timestep = settings.GetValue("rate", 40); WorldRenderer.ShowUnitPaths = settings.GetValue("pathdebug", false); + Game.timestep = settings.GetValue("rate", 40); Game.Replay = settings.GetValue("replay", ""); Game.Initialize(settings.GetValue("map", "scm12ea.ini"), renderer, new int2(ClientSize),