mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-24 01:21:01 +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.primary = primary;
|
||||
this.available_resolutions.AddRange(availableResolutions);
|
||||
available_displays.Add(this);
|
||||
if (primary)
|
||||
primary_display = this;
|
||||
|
||||
lock (display_lock)
|
||||
{
|
||||
available_displays.Add(this);
|
||||
if (primary)
|
||||
primary_display = this;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue