Code style changes

This commit is contained in:
jduncanator 2019-11-18 15:54:29 +11:00
commit 578b5b2a54
4 changed files with 15 additions and 11 deletions

View file

@ -22,11 +22,12 @@ namespace Ryujinx.HLE.HOS.Applets
public ResultCode Start(AppletSession normalSession, public ResultCode Start(AppletSession normalSession,
AppletSession interactiveSession) AppletSession interactiveSession)
{ {
_normalSession = normalSession; _normalSession = normalSession;
_interactiveSession = interactiveSession; _interactiveSession = interactiveSession;
// TODO(jduncanator): Parse PlayerSelectConfig from input data // TODO(jduncanator): Parse PlayerSelectConfig from input data
_normalSession.Push(BuildResponse()); _normalSession.Push(BuildResponse());
AppletStateChanged?.Invoke(this, null); AppletStateChanged?.Invoke(this, null);
return ResultCode.Success; return ResultCode.Success;

View file

@ -12,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Applets
private const string DEFAULT_NUMB = "1"; private const string DEFAULT_NUMB = "1";
private const string DEFAULT_TEXT = "Ryujinx"; private const string DEFAULT_TEXT = "Ryujinx";
private const int STANDARD_BUFFER_SIZE = 0x7D8; private const int STANDARD_BUFFER_SIZE = 0x7D8;
private const int INTERACTIVE_BUFFER_SIZE = 0x7D4; private const int INTERACTIVE_BUFFER_SIZE = 0x7D4;
private SoftwareKeyboardState _state = SoftwareKeyboardState.Uninitialized; private SoftwareKeyboardState _state = SoftwareKeyboardState.Uninitialized;
@ -31,12 +31,12 @@ namespace Ryujinx.HLE.HOS.Applets
public ResultCode Start(AppletSession normalSession, public ResultCode Start(AppletSession normalSession,
AppletSession interactiveSession) AppletSession interactiveSession)
{ {
_normalSession = normalSession; _normalSession = normalSession;
_interactiveSession = interactiveSession; _interactiveSession = interactiveSession;
_interactiveSession.DataAvailable += OnInteractiveData; _interactiveSession.DataAvailable += OnInteractiveData;
var launchParams = _normalSession.Pop(); var launchParams = _normalSession.Pop();
var keyboardConfig = _normalSession.Pop(); var keyboardConfig = _normalSession.Pop();
var transferMemory = _normalSession.Pop(); var transferMemory = _normalSession.Pop();
@ -85,6 +85,7 @@ namespace Ryujinx.HLE.HOS.Applets
_state = SoftwareKeyboardState.Complete; _state = SoftwareKeyboardState.Complete;
_normalSession.Push(BuildResponse(_textValue, false)); _normalSession.Push(BuildResponse(_textValue, false));
AppletStateChanged?.Invoke(this, null); AppletStateChanged?.Invoke(this, null);
} }
else else
@ -113,6 +114,7 @@ namespace Ryujinx.HLE.HOS.Applets
// For now we assume success, so we push the final result // For now we assume success, so we push the final result
// to the standard output buffer and carry on our merry way. // to the standard output buffer and carry on our merry way.
_normalSession.Push(BuildResponse(_textValue, false)); _normalSession.Push(BuildResponse(_textValue, false));
AppletStateChanged?.Invoke(this, null); AppletStateChanged?.Invoke(this, null);
_state = SoftwareKeyboardState.Complete; _state = SoftwareKeyboardState.Complete;
@ -122,6 +124,7 @@ namespace Ryujinx.HLE.HOS.Applets
// If we have already completed, we push the result text // If we have already completed, we push the result text
// back on the output buffer and poll the application. // back on the output buffer and poll the application.
_normalSession.Push(BuildResponse(_textValue, false)); _normalSession.Push(BuildResponse(_textValue, false));
AppletStateChanged?.Invoke(this, null); AppletStateChanged?.Invoke(this, null);
} }
else else

View file

@ -20,17 +20,17 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib
public ILibraryAppletAccessor(AppletId appletId, Horizon system) public ILibraryAppletAccessor(AppletId appletId, Horizon system)
{ {
_stateChangedEvent = new KEvent(system); _stateChangedEvent = new KEvent(system);
_normalOutDataEvent = new KEvent(system); _normalOutDataEvent = new KEvent(system);
_interactiveOutDataEvent = new KEvent(system); _interactiveOutDataEvent = new KEvent(system);
_applet = AppletManager.Create(appletId, system); _applet = AppletManager.Create(appletId, system);
_normalSession = new AppletSession(); _normalSession = new AppletSession();
_interactiveSession = new AppletSession(); _interactiveSession = new AppletSession();
_applet.AppletStateChanged += OnAppletStateChanged; _applet.AppletStateChanged += OnAppletStateChanged;
_normalSession.DataAvailable += OnNormalOutData; _normalSession.DataAvailable += OnNormalOutData;
_interactiveSession.DataAvailable += OnInteractiveOutData; _interactiveSession.DataAvailable += OnInteractiveOutData;
Logger.PrintInfo(LogClass.ServiceAm, $"Applet '{appletId}' created."); Logger.PrintInfo(LogClass.ServiceAm, $"Applet '{appletId}' created.");

View file

@ -23,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
IAppletFifo<byte[]> inputData, IAppletFifo<byte[]> inputData,
IAppletFifo<byte[]> outputData) IAppletFifo<byte[]> outputData)
{ {
_inputData = inputData; _inputData = inputData;
_outputData = outputData; _outputData = outputData;
_inputData.DataAvailable += OnDataAvailable; _inputData.DataAvailable += OnDataAvailable;