Compare commits

..

6 Commits

Author SHA1 Message Date
gdkchan
9827dc35e1 Allow loading NSPs without a NCA inside (#3364)
* Allow loading NSPs without a NCA inside

* Set isHomebrew as true
2022-05-31 16:16:59 -03:00
riperiperi
448723d3b3 Don't force DPI aware on Avalonia - it already has it covered. (#3354) 2022-05-21 23:32:50 +02:00
gdkchan
89294b7772 Fix audio renderer error message result code base (#3348) 2022-05-19 00:59:27 +02:00
Emmanuel Hansen
7b9c4757dd UI - Scale end framebuffer blit (#3342)
* Scale end framebuffer blit

* fix

* fix

* apply changes to avalonia
2022-05-16 18:10:29 -03:00
Mary
b8fc97adf2 Fix Avalonia updater 2022-05-15 21:01:12 +02:00
Emmanuel Hansen
c1a7b5bcdb fix amiibo image path (#3345) 2022-05-15 20:47:00 +02:00
10 changed files with 24 additions and 34 deletions

View File

@@ -177,7 +177,7 @@ namespace Ryujinx.Ava
{ {
if (_renderer != null) if (_renderer != null)
{ {
double scale = Program.WindowScaleFactor; double scale = _parent.PlatformImpl.RenderScaling;
_renderer.Window.SetSize((int)(size.Width * scale), (int)(size.Height * scale)); _renderer.Window.SetSize((int)(size.Width * scale), (int)(size.Height * scale));
} }
} }
@@ -809,7 +809,7 @@ namespace Ryujinx.Ava
Width = (int)Renderer.Bounds.Width; Width = (int)Renderer.Bounds.Width;
Height = (int)Renderer.Bounds.Height; Height = (int)Renderer.Bounds.Height;
_renderer.Window.SetSize((int)(Width * Program.WindowScaleFactor), (int)(Height * Program.WindowScaleFactor)); _renderer.Window.SetSize((int)(Width * _parent.PlatformImpl.RenderScaling), (int)(Height * _parent.PlatformImpl.RenderScaling));
Device.Gpu.Renderer.RunLoop(() => Device.Gpu.Renderer.RunLoop(() =>
{ {

View File

@@ -98,7 +98,7 @@ namespace Ryujinx.Modules
string assetState = (string)asset["state"]; string assetState = (string)asset["state"];
string downloadURL = (string)asset["browser_download_url"]; string downloadURL = (string)asset["browser_download_url"];
if (assetName.StartsWith("ava-ryujinx") && assetName.EndsWith(_platformExt)) if (assetName.StartsWith("test-ava-ryujinx") && assetName.EndsWith(_platformExt))
{ {
_buildUrl = downloadURL; _buildUrl = downloadURL;

View File

@@ -137,7 +137,6 @@ namespace Ryujinx.Ava
} }
// Make process DPI aware for proper window sizing on high-res screens. // Make process DPI aware for proper window sizing on high-res screens.
ForceDpiAware.Windows();
WindowScaleFactor = ForceDpiAware.GetWindowScaleFactor(); WindowScaleFactor = ForceDpiAware.GetWindowScaleFactor();
// Delete backup files after updating. // Delete backup files after updating.

View File

@@ -73,10 +73,13 @@ namespace Ryujinx.Ava.Ui.Controls
{ {
SizeChanged?.Invoke(this, rect.Size); SizeChanged?.Invoke(this, rect.Size);
RenderSize = rect.Size * Program.WindowScaleFactor; if (!rect.IsEmpty)
{
RenderSize = rect.Size * VisualRoot.RenderScaling;
_glDrawOperation?.Dispose(); _glDrawOperation?.Dispose();
_glDrawOperation = new GlDrawOperation(this); _glDrawOperation = new GlDrawOperation(this);
}
} }
public override void Render(DrawingContext context) public override void Render(DrawingContext context)

View File

@@ -123,10 +123,6 @@ namespace Ryujinx.Ava.Ui.Windows
CheckLaunchState(); CheckLaunchState();
} }
if (OperatingSystem.IsLinux())
{
Program.WindowScaleFactor = this.PlatformImpl.RenderScaling;
}
_rendererWaitEvent = new AutoResetEvent(false); _rendererWaitEvent = new AutoResetEvent(false);
} }

View File

@@ -280,13 +280,6 @@ namespace Ryujinx.HLE.HOS
return; return;
} }
if (mainNca == null)
{
Logger.Error?.Print(LogClass.Loader, "Unable to load NSP: Could not find Main NCA");
return;
}
if (mainNca != null) if (mainNca != null)
{ {
_device.Configuration.ContentManager.ClearAocData(); _device.Configuration.ContentManager.ClearAocData();
@@ -298,7 +291,7 @@ namespace Ryujinx.HLE.HOS
} }
// This is not a normal NSP, it's actually a ExeFS as a NSP // This is not a normal NSP, it's actually a ExeFS as a NSP
LoadExeFs(nsp); LoadExeFs(nsp, null, isHomebrew: true);
} }
public void LoadNca(string ncaFile) public void LoadNca(string ncaFile)
@@ -593,7 +586,7 @@ namespace Ryujinx.HLE.HOS
} }
} }
private void LoadExeFs(IFileSystem codeFs, MetaLoader metaData = null) private void LoadExeFs(IFileSystem codeFs, MetaLoader metaData = null, bool isHomebrew = false)
{ {
if (_device.Configuration.VirtualFileSystem.ModLoader.ReplaceExefsPartition(TitleId, ref codeFs)) if (_device.Configuration.VirtualFileSystem.ModLoader.ReplaceExefsPartition(TitleId, ref codeFs))
{ {
@@ -661,7 +654,7 @@ namespace Ryujinx.HLE.HOS
Ptc.Initialize(TitleIdText, DisplayVersion, usePtc, memoryManagerMode); Ptc.Initialize(TitleIdText, DisplayVersion, usePtc, memoryManagerMode);
// We allow it for nx-hbloader because it can be used to launch homebrew. // We allow it for nx-hbloader because it can be used to launch homebrew.
bool allowCodeMemoryForJit = TitleId == 0x010000000000100DUL; bool allowCodeMemoryForJit = TitleId == 0x010000000000100DUL || isHomebrew;
metaData.GetNpdm(out Npdm npdm).ThrowIfFailure(); metaData.GetNpdm(out Npdm npdm).ThrowIfFailure();
ProgramInfo programInfo = new ProgramInfo(in npdm, allowCodeMemoryForJit); ProgramInfo programInfo = new ProgramInfo(in npdm, allowCodeMemoryForJit);

View File

@@ -83,7 +83,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRenderer
} }
else else
{ {
Logger.Error?.Print(LogClass.ServiceAudio, $"Error while processing renderer update: 0x{result}"); Logger.Error?.Print(LogClass.ServiceAudio, $"Error while processing renderer update: 0x{(int)result:X}");
} }
return result; return result;

View File

@@ -114,12 +114,12 @@ namespace Ryujinx.Ui
GL.BlitFramebuffer(0, GL.BlitFramebuffer(0,
0, 0,
AllocatedWidth, WindowWidth,
AllocatedHeight, WindowHeight,
0, 0,
0, 0,
AllocatedWidth, WindowWidth,
AllocatedHeight, WindowHeight,
ClearBufferMask.ColorBufferBit, ClearBufferMask.ColorBufferBit,
BlitFramebufferFilter.Linear); BlitFramebufferFilter.Linear);
} }

View File

@@ -41,6 +41,8 @@ namespace Ryujinx.Ui
public IRenderer Renderer { get; private set; } public IRenderer Renderer { get; private set; }
public bool ScreenshotRequested { get; set; } public bool ScreenshotRequested { get; set; }
protected int WindowWidth { get; private set; }
protected int WindowHeight { get; private set; }
public static event EventHandler<StatusUpdatedEventArgs> StatusUpdatedEvent; public static event EventHandler<StatusUpdatedEventArgs> StatusUpdatedEvent;
@@ -71,9 +73,6 @@ namespace Ryujinx.Ui
private IKeyboard _keyboardInterface; private IKeyboard _keyboardInterface;
private GraphicsDebugLevel _glLogLevel; private GraphicsDebugLevel _glLogLevel;
private string _gpuVendorName; private string _gpuVendorName;
private int _windowHeight;
private int _windowWidth;
private bool _isMouseInClient; private bool _isMouseInClient;
public RendererWidgetBase(InputManager inputManager, GraphicsDebugLevel glLogLevel) public RendererWidgetBase(InputManager inputManager, GraphicsDebugLevel glLogLevel)
@@ -223,10 +222,10 @@ namespace Ryujinx.Ui
Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window); Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window);
_windowWidth = evnt.Width * monitor.ScaleFactor; WindowWidth = evnt.Width * monitor.ScaleFactor;
_windowHeight = evnt.Height * monitor.ScaleFactor; WindowHeight = evnt.Height * monitor.ScaleFactor;
Renderer?.Window.SetSize(_windowWidth, _windowHeight); Renderer?.Window.SetSize(WindowWidth, WindowHeight);
return result; return result;
} }
@@ -307,7 +306,7 @@ namespace Ryujinx.Ui
} }
Renderer = renderer; Renderer = renderer;
Renderer?.Window.SetSize(_windowWidth, _windowHeight); Renderer?.Window.SetSize(WindowWidth, WindowHeight);
if (Renderer != null) if (Renderer != null)
{ {

View File

@@ -112,7 +112,7 @@ namespace Ryujinx.Ui.Windows
_amiiboJsonPath = System.IO.Path.Join(AppDataManager.BaseDirPath, "system", "amiibo", "Amiibo.json"); _amiiboJsonPath = System.IO.Path.Join(AppDataManager.BaseDirPath, "system", "amiibo", "Amiibo.json");
_amiiboList = new List<AmiiboApi>(); _amiiboList = new List<AmiiboApi>();
_amiiboLogoBytes = EmbeddedResources.Read("Ryujinx/Ui/Resources/Logo_Amiibo.png"); _amiiboLogoBytes = EmbeddedResources.Read("Ryujinx.Ui.Common/Resources/Logo_Amiibo.png");
_amiiboImage.Pixbuf = new Gdk.Pixbuf(_amiiboLogoBytes); _amiiboImage.Pixbuf = new Gdk.Pixbuf(_amiiboLogoBytes);
_scanButton.Sensitive = false; _scanButton.Sensitive = false;