mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-24 08:11:08 +00:00
Lock in constructor for thread safety.
This commit is contained in:
parent
534de7a266
commit
60138b2ff4
|
@ -69,9 +69,13 @@ namespace OpenTK.Graphics
|
||||||
this.current_resolution = currentResolution;
|
this.current_resolution = currentResolution;
|
||||||
this.primary = primary;
|
this.primary = primary;
|
||||||
this.available_resolutions.AddRange(availableResolutions);
|
this.available_resolutions.AddRange(availableResolutions);
|
||||||
available_displays.Add(this);
|
|
||||||
if (primary)
|
lock (display_lock)
|
||||||
primary_display = this;
|
{
|
||||||
|
available_displays.Add(this);
|
||||||
|
if (primary)
|
||||||
|
primary_display = this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue