Move Virtual Pads schemata to Cores

This commit is contained in:
YoshiRulz 2020-12-22 18:37:27 +10:00
parent 790a09067e
commit 03b4ae18e0
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
33 changed files with 37 additions and 37 deletions

View File

@ -77,7 +77,7 @@ namespace BizHawk.Client.EmuHawk
Type schemaType;
try
{
schemaType = EmuHawk.ReflectionCache.Types.Where(typeof(IVirtualPadSchema).IsAssignableFrom)
schemaType = Emulation.Cores.ReflectionCache.Types.Where(typeof(IVirtualPadSchema).IsAssignableFrom)
.Select(t => (SchemaType: t, Attr: t.GetCustomAttributes(false).OfType<SchemaAttribute>().FirstOrDefault()))
.First(tuple => tuple.Attr?.SystemId == Emulator.SystemId)
.SchemaType;

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Common
{
public interface IVirtualPadSchema
{

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Drawing;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Common
{
public class PadSchema
{

View File

@ -5,7 +5,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Common
{
public abstract class PadSchemaControl
{

View File

@ -1,6 +1,6 @@
using System;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Common
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class SchemaAttribute : Attribute

View File

@ -5,7 +5,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Atari.Atari2600;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("A26")]
// ReSharper disable once UnusedMember.Global

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Common;
using BizHawk.Common.ReflectionExtensions;
using BizHawk.Emulation.Cores.Atari.A7800Hawk;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("A78")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("AppleII")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("C64")]
// ReSharper disable once UnusedMember.Global

View File

@ -5,7 +5,7 @@ using System.Linq;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.ColecoVision;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("Coleco")]
// ReSharper disable once UnusedMember.Global
@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core, Action<string> showMessageBox)
{
var deck = ((ColecoVision)core).ControllerDeck;
var deck = ((ColecoVision.ColecoVision) core).ControllerDeck;
var ports = new[] { deck.Port1.GetType(), deck.Port2.GetType() };
for (int i = 0; i < 2; i++)

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("DGB")]
// ReSharper disable once UnusedMember.Global

View File

@ -5,7 +5,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Nintendo.GBA;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("GBA")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("GB")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("GGL")]
// ReSharper disable once UnusedMember.Global

View File

@ -6,7 +6,7 @@ using System.Linq;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("GEN")]
// ReSharper disable once UnusedMember.Global

View File

@ -7,7 +7,7 @@ using BizHawk.Common.ReflectionExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Intellivision;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("INTV")]
// ReSharper disable once UnusedMember.Global
@ -18,7 +18,7 @@ namespace BizHawk.Client.EmuHawk
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core, Action<string> showMessageBox)
{
var intvSyncSettings = ((Intellivision)core).GetSyncSettings().Clone();
var intvSyncSettings = ((Intellivision.Intellivision) core).GetSyncSettings().Clone();
var port1 = intvSyncSettings.Port1;
var port2 = intvSyncSettings.Port2;

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("Lynx")]
// ReSharper disable once UnusedMember.Global

View File

@ -6,7 +6,7 @@ using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Nintendo.N64;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("N64")]
// ReSharper disable once UnusedMember.Global

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk.tools.VirtualPads.schema
namespace BizHawk.Emulation.Cores
{
[Schema("NDS")]
// ReSharper disable once UnusedMember.Global

View File

@ -8,7 +8,7 @@ using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Cores.Nintendo.SubNESHawk;
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("NES")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("NGP")]
// ReSharper disable once UnusedMember.Global

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("O2")]
// ReSharper disable once UnusedMember.Global

View File

@ -6,7 +6,7 @@ using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Sony.PSX;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("PSX")]
// ReSharper disable once UnusedMember.Global

View File

@ -8,7 +8,7 @@ using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.PCEngine;
using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("PCECD")]
// ReSharper disable once UnusedMember.Global
@ -25,13 +25,13 @@ namespace BizHawk.Client.EmuHawk
{
return core switch
{
PCEngine pce => PceHawkSchemas(pce, showMessageBox),
PCEngine.PCEngine pce => PceHawkSchemas(pce, showMessageBox),
NymaCore nyma => NymaSchemas(nyma, showMessageBox),
_ => Enumerable.Empty<PadSchema>()
};
}
private static IEnumerable<PadSchema> PceHawkSchemas(PCEngine core, Action<string> showMessageBox)
private static IEnumerable<PadSchema> PceHawkSchemas(PCEngine.PCEngine core, Action<string> showMessageBox)
{
var ss = core.GetSyncSettings();

View File

@ -7,7 +7,7 @@ using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("PCFX")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("SGB")]
// ReSharper disable once UnusedMember.Global

View File

@ -7,7 +7,7 @@ using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("SAT")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Sega.MasterSystem;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("SMS")]
// ReSharper disable once UnusedMember.Global

View File

@ -7,7 +7,7 @@ using BizHawk.Emulation.Cores.Nintendo.SNES;
using BizHawk.Emulation.Cores.Nintendo.SNES9X;
using BizHawk.Emulation.Cores.Waterbox;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("SNES")]
// ReSharper disable once UnusedMember.Global

View File

@ -5,7 +5,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Vectrex;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("VEC")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("VB")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("WSWAN")]
// ReSharper disable once UnusedMember.Global

View File

@ -4,7 +4,7 @@ using System.Drawing;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Emulation.Cores
{
[Schema("ZXSpectrum")]
// ReSharper disable once UnusedMember.Global