mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 03:16:23 +02:00
Add Fixed Handheld mode, Location to keep game running in the background, New Airplay Menu amd more
This commit is contained in:
parent
15171a703a
commit
e382a35387
13 changed files with 381 additions and 183 deletions
|
@ -403,10 +403,22 @@ namespace Ryujinx.Headless.SDL2
|
|||
}
|
||||
|
||||
[UnmanagedCallersOnly(EntryPoint = "stop_emulation")]
|
||||
public static void StopEmulation()
|
||||
public static void StopEmulation(bool shouldPause)
|
||||
{
|
||||
if (_window != null)
|
||||
{
|
||||
if (!shouldPause)
|
||||
{
|
||||
_window.Device.SetVolume(1);
|
||||
_window._isPaused = false;
|
||||
_window._pauseEvent.Set();
|
||||
}
|
||||
else
|
||||
{
|
||||
_window.Device.SetVolume(0);
|
||||
_window._isPaused = true;
|
||||
_window._pauseEvent.Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -886,19 +898,9 @@ namespace Ryujinx.Headless.SDL2
|
|||
{
|
||||
if (inputId == null)
|
||||
{
|
||||
if (index == PlayerIndex.Player1)
|
||||
{
|
||||
Logger.Info?.Print(LogClass.Application, $"{index} not configured, defaulting to default keyboard.");
|
||||
Logger.Info?.Print(LogClass.Application, $"{index} not configured");
|
||||
|
||||
// Default to keyboard
|
||||
inputId = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Info?.Print(LogClass.Application, $"{index} not configured");
|
||||
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
IGamepad gamepad;
|
||||
|
@ -989,12 +991,26 @@ namespace Ryujinx.Headless.SDL2
|
|||
{
|
||||
bool isNintendoStyle = true; // gamepadName.Contains("Nintendo") || gamepadName.Contains("Joycons");
|
||||
|
||||
ControllerType currentController;
|
||||
if (index == PlayerIndex.Handheld)
|
||||
{
|
||||
currentController = ControllerType.Handheld;
|
||||
}
|
||||
else if (gamepadName.Contains("Joycons") || gamepadName.Contains("Backbone"))
|
||||
{
|
||||
currentController = ControllerType.JoyconPair;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentController = ControllerType.ProController;
|
||||
}
|
||||
|
||||
config = new StandardControllerInputConfig
|
||||
{
|
||||
Version = InputConfig.CurrentVersion,
|
||||
Backend = InputBackendType.GamepadSDL2,
|
||||
Id = null,
|
||||
ControllerType = ControllerType.JoyconPair,
|
||||
ControllerType = currentController,
|
||||
DeadzoneLeft = 0.1f,
|
||||
DeadzoneRight = 0.1f,
|
||||
RangeLeft = 1.0f,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue