Apply cursor doubling setting without requiring a restart.

This commit is contained in:
Paul Chote
2020-01-17 23:30:12 +00:00
committed by Matthias Mailänder
parent 847db5e59b
commit f7e5111123
6 changed files with 26 additions and 15 deletions

View File

@@ -265,7 +265,7 @@ namespace OpenRA.Platforms.Default
return scaledData;
}
public IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot)
public IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot, bool pixelDouble)
{
VerifyThreadAffinity();
try
@@ -280,7 +280,7 @@ namespace OpenRA.Platforms.Default
}
// Scale all but the "default" cursor if requested by the player
if (Game.Settings.Graphics.CursorDouble && name != "default")
if (pixelDouble)
{
data = DoublePixelData(data, size);
size = new Size(2 * size.Width, 2 * size.Height);