mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-24 19:15:12 +00:00
Better SDL2 Audio Init Error Logging (#3967)
* Better SDL2 Audio Init Error Logging * Update Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs Co-authored-by: Mary-nyan <thog@protonmail.com> * Update Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs Co-authored-by: Mary-nyan <thog@protonmail.com> * Update Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs Co-authored-by: Mary-nyan <thog@protonmail.com> * Update Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> * Update Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> * Update SDL2HardwareDeviceDriver.cs * Update SDL2HardwareDeviceDriver.cs Co-authored-by: Mary-nyan <thog@protonmail.com> Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
parent
458452279c
commit
456fc04007
2 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
using Ryujinx.Audio.Common;
|
using Ryujinx.Audio.Common;
|
||||||
using Ryujinx.Audio.Integration;
|
using Ryujinx.Audio.Integration;
|
||||||
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Memory;
|
using Ryujinx.Memory;
|
||||||
using Ryujinx.SDL2.Common;
|
using Ryujinx.SDL2.Common;
|
||||||
using System;
|
using System;
|
||||||
|
@ -112,6 +113,9 @@ namespace Ryujinx.Audio.Backends.SDL2
|
||||||
|
|
||||||
if (device == 0)
|
if (device == 0)
|
||||||
{
|
{
|
||||||
|
Logger.Error?.Print(LogClass.Application,
|
||||||
|
$"SDL2 open audio device initialization failed with error \"{SDL_GetError()}\"");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +123,7 @@ namespace Ryujinx.Audio.Backends.SDL2
|
||||||
|
|
||||||
if (!isValid)
|
if (!isValid)
|
||||||
{
|
{
|
||||||
|
Logger.Error?.Print(LogClass.Application, "SDL2 open audio device is not valid");
|
||||||
SDL_CloseAudioDevice(device);
|
SDL_CloseAudioDevice(device);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace Ryujinx.SDL2.Common
|
||||||
|
|
||||||
if (SDL_Init(SdlInitFlags) != 0)
|
if (SDL_Init(SdlInitFlags) != 0)
|
||||||
{
|
{
|
||||||
string errorMessage = $"SDL2 initlaization failed with error \"{SDL_GetError()}\"";
|
string errorMessage = $"SDL2 initialization failed with error \"{SDL_GetError()}\"";
|
||||||
|
|
||||||
Logger.Error?.Print(LogClass.Application, errorMessage);
|
Logger.Error?.Print(LogClass.Application, errorMessage);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue