Enable nullability in some services

This commit is contained in:
YoshiRulz 2021-07-27 12:34:56 +10:00
parent aa9402f3c8
commit 8d210df9e3
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
14 changed files with 15 additions and 40 deletions

View File

@ -20,7 +20,7 @@ namespace BizHawk.Client.Common
_bb = null;
}
public int[] GetVideoBuffer() => _bb.Pixels;
public int[] GetVideoBuffer() => _bb.Pixels!;
public int VirtualWidth => _bb.Width;

View File

@ -218,10 +218,7 @@ namespace BizHawk.Client.EmuHawk
{
public int[] VideoBuffer { get; set; }
public int[] GetVideoBuffer()
{
return VideoBuffer;
}
public int[] GetVideoBuffer() => VideoBuffer!;
public int VirtualWidth => BufferWidth;

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// This interface specifies that an interface or implementation is a emulator core service, such as <seealso cref="IDebuggable"/>,

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// An <seealso cref="IEmulatorService"/> that returns cart/mapper/board information about the Game hardware itself, if available

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// This service provides a means for the current core to generate a

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
public interface ICycleTiming
{

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// Specifies an interface for returning the state of a LED drive light such as on Disk and CD Drives,

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// This service specifies the interaction of the client and the core in terms of the state of input polling

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// This service is use by link cable capable cores to manage the status of the link cable

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// This service provides the means for a core to specify region information to the client, such NTSC versus PAL

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// Provides detailed information about the Rom such as hashes,
@ -12,6 +10,6 @@ namespace BizHawk.Emulation.Common
/// All necessary information about the Rom.
/// Expected to be formatted for user consumption
/// </summary>
string RomDetails { get; }
string? RomDetails { get; }
}
}

View File

@ -1,6 +1,4 @@
#nullable disable
namespace BizHawk.Emulation.Common
namespace BizHawk.Emulation.Common
{
/// <summary>
/// Provides an interface to convey the effective X, Y coordinates that represent

View File

@ -1,6 +1,4 @@
#nullable disable
using System;
using System;
namespace BizHawk.Emulation.Common
{

View File

@ -200,7 +200,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
public int VsyncDenominator => GateArray.Z80ClockSpeed;
public int[] GetVideoBuffer() => ProcessVideoBuffer();
public int[] GetVideoBuffer() => ProcessVideoBuffer()!;
public void SetupScreenSize()
{