mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-01 22:07:10 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
92
src/Ryujinx.HLE/HOS/Services/Lbl/ILblController.cs
Normal file
92
src/Ryujinx.HLE/HOS/Services/Lbl/ILblController.cs
Normal file
|
@ -0,0 +1,92 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Lbl
|
||||
{
|
||||
abstract class ILblController : IpcService
|
||||
{
|
||||
public ILblController(ServiceCtx context) { }
|
||||
|
||||
protected abstract void SetCurrentBrightnessSettingForVrMode(float currentBrightnessSettingForVrMode);
|
||||
protected abstract float GetCurrentBrightnessSettingForVrMode();
|
||||
internal abstract void EnableVrMode();
|
||||
internal abstract void DisableVrMode();
|
||||
protected abstract bool IsVrModeEnabled();
|
||||
|
||||
[CommandCmif(17)]
|
||||
// SetBrightnessReflectionDelayLevel(float, float)
|
||||
public ResultCode SetBrightnessReflectionDelayLevel(ServiceCtx context)
|
||||
{
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(18)]
|
||||
// GetBrightnessReflectionDelayLevel(float) -> float
|
||||
public ResultCode GetBrightnessReflectionDelayLevel(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write(0.0f);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(21)]
|
||||
// SetCurrentAmbientLightSensorMapping(unknown<0xC>)
|
||||
public ResultCode SetCurrentAmbientLightSensorMapping(ServiceCtx context)
|
||||
{
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(22)]
|
||||
// GetCurrentAmbientLightSensorMapping() -> unknown<0xC>
|
||||
public ResultCode GetCurrentAmbientLightSensorMapping(ServiceCtx context)
|
||||
{
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(24)] // 3.0.0+
|
||||
// SetCurrentBrightnessSettingForVrMode(float)
|
||||
public ResultCode SetCurrentBrightnessSettingForVrMode(ServiceCtx context)
|
||||
{
|
||||
float currentBrightnessSettingForVrMode = context.RequestData.ReadSingle();
|
||||
|
||||
SetCurrentBrightnessSettingForVrMode(currentBrightnessSettingForVrMode);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(25)] // 3.0.0+
|
||||
// GetCurrentBrightnessSettingForVrMode() -> float
|
||||
public ResultCode GetCurrentBrightnessSettingForVrMode(ServiceCtx context)
|
||||
{
|
||||
float currentBrightnessSettingForVrMode = GetCurrentBrightnessSettingForVrMode();
|
||||
|
||||
context.ResponseData.Write(currentBrightnessSettingForVrMode);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(26)] // 3.0.0+
|
||||
// EnableVrMode()
|
||||
public ResultCode EnableVrMode(ServiceCtx context)
|
||||
{
|
||||
EnableVrMode();
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(27)] // 3.0.0+
|
||||
// DisableVrMode()
|
||||
public ResultCode DisableVrMode(ServiceCtx context)
|
||||
{
|
||||
DisableVrMode();
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(28)] // 3.0.0+
|
||||
// IsVrModeEnabled() -> bool
|
||||
public ResultCode IsVrModeEnabled(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write(IsVrModeEnabled());
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Ryujinx.HLE/HOS/Services/Lbl/LblControllerServer.cs
Normal file
54
src/Ryujinx.HLE/HOS/Services/Lbl/LblControllerServer.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Lbl
|
||||
{
|
||||
[Service("lbl")]
|
||||
class LblControllerServer : ILblController
|
||||
{
|
||||
private bool _vrModeEnabled;
|
||||
private float _currentBrightnessSettingForVrMode;
|
||||
|
||||
public LblControllerServer(ServiceCtx context) : base(context) { }
|
||||
|
||||
protected override void SetCurrentBrightnessSettingForVrMode(float currentBrightnessSettingForVrMode)
|
||||
{
|
||||
if (float.IsNaN(currentBrightnessSettingForVrMode) || float.IsInfinity(currentBrightnessSettingForVrMode))
|
||||
{
|
||||
_currentBrightnessSettingForVrMode = 0.0f;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
_currentBrightnessSettingForVrMode = currentBrightnessSettingForVrMode;
|
||||
}
|
||||
|
||||
protected override float GetCurrentBrightnessSettingForVrMode()
|
||||
{
|
||||
if (float.IsNaN(_currentBrightnessSettingForVrMode) || float.IsInfinity(_currentBrightnessSettingForVrMode))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return _currentBrightnessSettingForVrMode;
|
||||
}
|
||||
|
||||
internal override void EnableVrMode()
|
||||
{
|
||||
_vrModeEnabled = true;
|
||||
|
||||
// NOTE: Service check _vrModeEnabled field value in a thread and then change the screen brightness.
|
||||
// Since we don't support that. It's fine to do nothing.
|
||||
}
|
||||
|
||||
internal override void DisableVrMode()
|
||||
{
|
||||
_vrModeEnabled = false;
|
||||
|
||||
// NOTE: Service check _vrModeEnabled field value in a thread and then change the screen brightness.
|
||||
// Since we don't support that. It's fine to do nothing.
|
||||
}
|
||||
|
||||
protected override bool IsVrModeEnabled()
|
||||
{
|
||||
return _vrModeEnabled;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue