Added display selection option to settings for fullscreen modes.
This commit is contained in:
committed by
Paul Chote
parent
de0bb9ee39
commit
98aef70e88
@@ -17,7 +17,7 @@ namespace OpenRA
|
||||
{
|
||||
public interface IPlatform
|
||||
{
|
||||
IPlatformWindow CreateWindow(Size size, WindowMode windowMode, float scaleModifier, int batchSize);
|
||||
IPlatformWindow CreateWindow(Size size, WindowMode windowMode, float scaleModifier, int batchSize, int videoDisplay);
|
||||
ISoundEngine CreateSound(string device);
|
||||
IFont CreateFont(byte[] data);
|
||||
}
|
||||
@@ -44,6 +44,8 @@ namespace OpenRA
|
||||
float NativeWindowScale { get; }
|
||||
float EffectiveWindowScale { get; }
|
||||
Size SurfaceSize { get; }
|
||||
int DisplayCount { get; }
|
||||
int CurrentDisplay { get; }
|
||||
|
||||
event Action<float, float, float, float> OnWindowScaleChanged;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA
|
||||
this.platform = platform;
|
||||
var resolution = GetResolution(graphicSettings);
|
||||
|
||||
Window = platform.CreateWindow(new Size(resolution.Width, resolution.Height), graphicSettings.Mode, graphicSettings.UIScale, graphicSettings.BatchSize);
|
||||
Window = platform.CreateWindow(new Size(resolution.Width, resolution.Height), graphicSettings.Mode, graphicSettings.UIScale, graphicSettings.BatchSize, graphicSettings.VideoDisplay);
|
||||
Context = Window.Context;
|
||||
|
||||
TempBufferSize = graphicSettings.BatchSize;
|
||||
@@ -478,5 +478,15 @@ namespace OpenRA
|
||||
{
|
||||
return platform.CreateFont(data);
|
||||
}
|
||||
|
||||
public int DisplayCount
|
||||
{
|
||||
get { return Window.DisplayCount; }
|
||||
}
|
||||
|
||||
public int CurrentDisplay
|
||||
{
|
||||
get { return Window.CurrentDisplay; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,6 +176,9 @@ namespace OpenRA
|
||||
[Desc("Use OpenGL ES if both ES and regular OpenGL are available.")]
|
||||
public bool PreferGLES = false;
|
||||
|
||||
[Desc("Display index to use in a multi-monitor fullscreen setup.")]
|
||||
public int VideoDisplay = 0;
|
||||
|
||||
public int BatchSize = 8192;
|
||||
public int SheetSize = 2048;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user