Commit 86eb2137 authored by Gerard Gascón's avatar Gerard Gascón
Browse files

fix: build warnings

parent 61124fef
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -10,8 +10,8 @@ using wtf.cluster.JoyCon.InputReports;
namespace ControllerSlidePresenter.GamepadReader;

public class JoyConRead : IGamepadReader {
	public event Action NextSlide;
	public event Action PrevSlide;
	public event Action? NextSlide;
	public event Action? PrevSlide;

	public async Task Read() {
		Console.OutputEncoding = Encoding.UTF8;
+2 −2
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@ using WiimoteLib.NetCore;
namespace ControllerSlidePresenter.GamepadReader;

public class WiimoteRead : IGamepadReader {
	public event Action NextSlide;
	public event Action PrevSlide;
	public event Action? NextSlide;
	public event Action? PrevSlide;

	public async Task Read() {
		Wiimote wiimote = new();
+3 −0
Original line number Diff line number Diff line
@@ -16,11 +16,14 @@ public class SlideSwitcher : IDisposable {

	public SlideSwitcher(IGamepadReader? reader) {
		_reader = reader;
		if (_reader == null) return;

		_reader.NextSlide += NextSlide;
		_reader.PrevSlide += PreviousSlide;
	}

	public void Dispose() {
		if (_reader == null) return;
		_reader.NextSlide -= NextSlide;
		_reader.PrevSlide -= PreviousSlide;
	}