Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
32
src/Ryujinx.Graphics.Host1x/Devices.cs
Normal file
32
src/Ryujinx.Graphics.Host1x/Devices.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using Ryujinx.Graphics.Device;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Graphics.Host1x
|
||||
{
|
||||
class Devices : IDisposable
|
||||
{
|
||||
private readonly Dictionary<ClassId, IDeviceState> _devices = new Dictionary<ClassId, IDeviceState>();
|
||||
|
||||
public void RegisterDevice(ClassId classId, IDeviceState device)
|
||||
{
|
||||
_devices[classId] = device;
|
||||
}
|
||||
|
||||
public IDeviceState GetDevice(ClassId classId)
|
||||
{
|
||||
return _devices.TryGetValue(classId, out IDeviceState device) ? device : null;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var device in _devices.Values)
|
||||
{
|
||||
if (device is ThiDevice thi)
|
||||
{
|
||||
thi.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue