mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-28 00:52:04 +00:00
Add the ability to set or not docked mode via config file (#227)
* Add a toggleable DockedMode bool
This commit is contained in:
parent
02a6fdcd13
commit
1fd4311e12
4 changed files with 17 additions and 5 deletions
|
@ -3,6 +3,7 @@ using Ryujinx.HLE.OsHle.Handles;
|
|||
using Ryujinx.HLE.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using static Ryujinx.HLE.OsHle.SystemStateMgr;
|
||||
using static Ryujinx.HLE.OsHle.ErrorCode;
|
||||
|
||||
namespace Ryujinx.HLE.OsHle.Services.Am
|
||||
|
@ -57,14 +58,16 @@ namespace Ryujinx.HLE.OsHle.Services.Am
|
|||
|
||||
public long GetOperationMode(ServiceCtx Context)
|
||||
{
|
||||
Context.ResponseData.Write((byte)OperationMode.Handheld);
|
||||
OperationMode Mode = DockedMode?OperationMode.Docked: OperationMode.Handheld;
|
||||
Context.ResponseData.Write((byte)Mode);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetPerformanceMode(ServiceCtx Context)
|
||||
{
|
||||
Context.ResponseData.Write((byte)Apm.PerformanceMode.Handheld);
|
||||
Apm.PerformanceMode Mode = DockedMode?Apm.PerformanceMode.Docked: Apm.PerformanceMode.Handheld;
|
||||
Context.ResponseData.Write((byte)Mode);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace Ryujinx.HLE.OsHle
|
|||
|
||||
internal string ActiveAudioOutput { get; private set; }
|
||||
|
||||
public bool DockedMode { get; set; }
|
||||
|
||||
public SystemStateMgr()
|
||||
{
|
||||
SetLanguage(SystemLanguage.AmericanEnglish);
|
||||
|
|
|
@ -7,6 +7,8 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
using static Ryujinx.HLE.OsHle.SystemStateMgr;
|
||||
|
||||
namespace Ryujinx
|
||||
{
|
||||
public static class Config
|
||||
|
@ -32,6 +34,8 @@ namespace Ryujinx
|
|||
Log.SetEnable(LogLevel.Warning, Convert.ToBoolean(Parser.Value("Logging_Enable_Warn")));
|
||||
Log.SetEnable(LogLevel.Error, Convert.ToBoolean(Parser.Value("Logging_Enable_Error")));
|
||||
|
||||
DockedMode = Convert.ToBoolean(Parser.Value("Docked_Mode"));
|
||||
|
||||
string[] FilteredLogClasses = Parser.Value("Logging_Filtered_Classes").Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
//When the classes are specified on the list, we only
|
||||
|
|
|
@ -22,6 +22,9 @@ Logging_Enable_Error = true
|
|||
#Filtered log classes, seperated by ", ", eg. `Logging_Filtered_Classes = Loader, ServiceFS`
|
||||
Logging_Filtered_Classes =
|
||||
|
||||
#Enable or Disable Docked Mode
|
||||
Docked_Mode = false
|
||||
|
||||
#Controller Device Index
|
||||
GamePad_Index = 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue