mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-15 04:14:47 +00:00
misc: chore: add direct error code tuple to DisplayErrorAppletDialog
for use when i find the list of error codes -> causes
This commit is contained in:
parent
d3f84a1305
commit
f6822f7358
4 changed files with 10 additions and 6 deletions
|
@ -158,13 +158,15 @@ namespace Ryujinx.HLE.HOS.Applets.Error
|
|||
|
||||
string[] buttons = GetButtonsText(module, description, "DlgBtn");
|
||||
|
||||
bool showDetails = _horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Code: {module}-{description:0000}", "\n" + message, buttons);
|
||||
(uint Module, uint Description) errorCodeTuple = (module, uint.Parse(description.ToString("0000")));
|
||||
|
||||
bool showDetails = _horizon.Device.UIHandler.DisplayErrorAppletDialog($"Error Code: {module}-{description:0000}", "\n" + message, buttons, errorCodeTuple);
|
||||
if (showDetails)
|
||||
{
|
||||
message = GetMessageText(module, description, "FlvMsg");
|
||||
buttons = GetButtonsText(module, description, "FlvBtn");
|
||||
|
||||
_horizon.Device.UIHandler.DisplayErrorAppletDialog($"Details: {module}-{description:0000}", "\n" + message, buttons);
|
||||
_horizon.Device.UIHandler.DisplayErrorAppletDialog($"Details: {module}-{description:0000}", "\n" + message, buttons, errorCodeTuple);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,10 +45,12 @@ namespace Ryujinx.HLE.UI
|
|||
/// <param name="value">The value associated to the <paramref name="kind"/>.</param>
|
||||
void ExecuteProgram(Switch device, ProgramSpecifyKind kind, ulong value);
|
||||
|
||||
/// <summary>
|
||||
/// Displays a Message Dialog box specific to Error Applet and blocks until it is closed.
|
||||
/// </summary>
|
||||
/// <returns>False when OK is pressed, True when another button (Details) is pressed.</returns>
|
||||
bool DisplayErrorAppletDialog(string title, string message, string[] buttonsText);
|
||||
// ReSharper disable once UnusedParameter.Global
|
||||
bool DisplayErrorAppletDialog(string title, string message, string[] buttonsText, (uint Module, uint Description)? errorCode = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a handler to process keyboard inputs into text strings.
|
||||
|
|
|
@ -513,7 +513,7 @@ namespace Ryujinx.Headless
|
|||
Exit();
|
||||
}
|
||||
|
||||
public bool DisplayErrorAppletDialog(string title, string message, string[] buttonsText)
|
||||
public bool DisplayErrorAppletDialog(string title, string message, string[] buttonsText, (uint Module, uint Description)? errorCode = null)
|
||||
{
|
||||
SDL_MessageBoxData data = new()
|
||||
{
|
||||
|
@ -521,7 +521,7 @@ namespace Ryujinx.Headless
|
|||
message = message,
|
||||
buttons = new SDL_MessageBoxButtonData[buttonsText.Length],
|
||||
numbuttons = buttonsText.Length,
|
||||
window = WindowHandle,
|
||||
window = WindowHandle
|
||||
};
|
||||
|
||||
for (int i = 0; i < buttonsText.Length; i++)
|
||||
|
|
|
@ -217,7 +217,7 @@ namespace Ryujinx.Ava.UI.Applet
|
|||
_parent.ViewModel.AppHost?.Stop();
|
||||
}
|
||||
|
||||
public bool DisplayErrorAppletDialog(string title, string message, string[] buttons)
|
||||
public bool DisplayErrorAppletDialog(string title, string message, string[] buttons, (uint Module, uint Description)? errorCode = null)
|
||||
{
|
||||
ManualResetEvent dialogCloseEvent = new(false);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue