Compare commits

..

6 Commits

Author SHA1 Message Date
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
Mary
be1c375589 gh-actions: Prefix Avalonia builds with test- and disable prerelease.
As GitHub sort our builds in an alphanumeric way, we abuse that to fix
both new and old updater behaviour.

This should fix all our issues.

Avalonia updater will be broken between version 1.1.122 to 1.1.126, and
will need manual intervention.
2022-05-15 18:05:55 +02:00
Mary
378d19f87a gh-actions: Attempt to fix the whole mess up with Avalonia changes
Marked as prerelease just in case it break even more
2022-05-15 17:50:16 +02:00
Emmanuel Hansen
f59f65ec4f add avalonia builds to release (#3339) 2022-05-15 16:28:32 +02:00
8 changed files with 32 additions and 24 deletions

View File

@@ -53,6 +53,7 @@ jobs:
run: |
dotnet publish -c Release -r win-x64 -o ./publish_windows/publish /p:Version="${{ steps.version_info.outputs.build_version }}" /p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" /p:DebugType=embedded Ryujinx --self-contained
dotnet publish -c Release -r win-x64 -o ./publish_windows_sdl2_headless/publish /p:Version="${{ steps.version_info.outputs.build_version }}" /p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" /p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained
dotnet publish -c Release -r win-x64 -o ./publish_windows_ava/publish /p:Version="${{ steps.version_info.outputs.build_version }}" /p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" /p:DebugType=embedded Ryujinx.Ava --self-contained
- name: Packing Windows builds
run: |
pushd publish_windows
@@ -60,7 +61,11 @@ jobs:
popd
pushd publish_windows_sdl2_headless
7z a ../release_output/ryujinx-headless-sdl2-${{ steps.version_info.outputs.build_version }}-win_x64.zip publish
7z a ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-win_x64.zip publish
popd
pushd publish_windows_ava
7z a ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-win_x64.zip publish
popd
shell: bash
@@ -68,6 +73,7 @@ jobs:
run: |
dotnet publish -c Release -r linux-x64 -o ./publish_linux/publish /p:Version="${{ steps.version_info.outputs.build_version }}" /p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" /p:DebugType=embedded Ryujinx --self-contained
dotnet publish -c Release -r linux-x64 -o ./publish_linux_sdl2_headless/publish /p:Version="${{ steps.version_info.outputs.build_version }}" /p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" /p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained
dotnet publish -c Release -r linux-x64 -o ./publish_linux_ava/publish /p:Version="${{ steps.version_info.outputs.build_version }}" /p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" /p:DebugType=embedded Ryujinx.Ava --self-contained
- name: Packing Linux builds
run: |
@@ -76,7 +82,11 @@ jobs:
popd
pushd publish_linux_sdl2_headless
tar -czvf ../release_output/ryujinx-headless-sdl2-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz publish
tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz publish
popd
pushd publish_linux_ava
tar -czvf ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz publish
popd
shell: bash

View File

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

View File

@@ -98,7 +98,7 @@ namespace Ryujinx.Modules
string assetState = (string)asset["state"];
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;

View File

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

View File

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

View File

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

View File

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

View File

@@ -112,7 +112,7 @@ namespace Ryujinx.Ui.Windows
_amiiboJsonPath = System.IO.Path.Join(AppDataManager.BaseDirPath, "system", "amiibo", "Amiibo.json");
_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);
_scanButton.Sensitive = false;