Inline `ICoreFileProvider.DllPath`

This commit is contained in:
James Groom 2023-11-14 18:05:32 +10:00 committed by GitHub
parent edf5f15134
commit 391190b6d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 12 deletions

View File

@ -26,8 +26,6 @@ namespace BizHawk.Client.Common
_firmwareUserSpecifications = firmwareUserSpecifications;
}
public string DllPath() => PathUtils.DllDirectoryPath;
// Poop
public string GetRetroSaveRAMDirectory(IGameInfo game)
=> _pathEntries.RetroSaveRamAbsolutePath(game);

View File

@ -5,11 +5,6 @@
/// </summary>
public interface ICoreFileProvider
{
/// <summary>
/// produces a path that contains emulation related DLL and exe files
/// </summary>
string DllPath();
/// <summary>
/// produces a path that contains saveram... because libretro cores need it
/// </summary>

View File

@ -11,6 +11,7 @@ using System.Text;
using BizHawk.BizInvoke;
using BizHawk.Common;
using BizHawk.Common.IOExtensions;
using BizHawk.Common.PathExtensions;
using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Waterbox;
@ -67,7 +68,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
_exe = new(new()
{
Filename = "libmamearcade.wbx",
Path = lp.Comm.CoreFileProvider.DllPath(),
Path = PathUtils.DllDirectoryPath,
SbrkHeapSizeKB = 512 * 1024,
InvisibleHeapSizeKB = 4,
MmapHeapSizeKB = 1024 * 1024,

View File

@ -2,6 +2,7 @@ using System;
using System.IO;
using System.Runtime.InteropServices;
using BizHawk.Common;
using BizHawk.Common.PathExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.Base_Implementations;
using BizHawk.Emulation.Cores.Components.W65816;
@ -65,7 +66,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
msuEndCb = _currentMsuTrack.AtEnd
};
Api = new BsnesApi(CoreComm.CoreFileProvider.DllPath(), CoreComm, callbacks.AllDelegatesInMemoryOrder());
Api = new(PathUtils.DllDirectoryPath, CoreComm, callbacks.AllDelegatesInMemoryOrder());
_controllers = new BsnesControllers(_syncSettings, subframe);

View File

@ -4,6 +4,7 @@ using System.Xml;
using System.IO;
using BizHawk.Common;
using BizHawk.Common.PathExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Components.W65816;
@ -69,7 +70,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
_pathrequestcb = snes_path_request;
// TODO: pass profile here
Api = new LibsnesApi(CoreComm.CoreFileProvider.DllPath(), CoreComm, new Delegate[]
Api = new(PathUtils.DllDirectoryPath, CoreComm, new Delegate[]
{
_videocb,
_inputpollcb,

View File

@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using BizHawk.BizInvoke;
using BizHawk.Common.PathExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Waterbox;
using BizHawk.Common;
@ -38,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
_elf = new WaterboxHost(new WaterboxOptions
{
Path = lp.Comm.CoreFileProvider.DllPath(),
Path = PathUtils.DllDirectoryPath,
Filename = "gpgx.wbx",
SbrkHeapSizeKB = 512,
SealedHeapSizeKB = 4 * 1024,

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
using BizHawk.Common;
using BizHawk.BizInvoke;
using BizHawk.Common.PathExtensions;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Waterbox
@ -48,7 +49,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
protected T PreInit<T>(WaterboxOptions options, IEnumerable<Delegate> allExtraDelegates = null)
where T : LibWaterboxCore
{
options.Path ??= CoreComm.CoreFileProvider.DllPath();
options.Path ??= PathUtils.DllDirectoryPath;
_exe = new WaterboxHost(options);
var delegates = new Delegate[] { _inputCallback }.AsEnumerable();
if (allExtraDelegates != null)