Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6b4ee82e5d | ||
|
e2a655f1a4 | ||
|
d9a18919b0 | ||
|
8354434a37 |
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@@ -71,7 +71,7 @@ jobs:
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
|
||||
- name: Overwrite csc problem matcher
|
||||
run: echo "::add-matcher::.github/csc.json"
|
||||
|
||||
@@ -104,37 +104,30 @@ jobs:
|
||||
if: matrix.platform.os == 'windows-latest'
|
||||
run: |
|
||||
pushd publish_ava
|
||||
cp publish/Ryujinx.exe publish/Ryujinx.Ava.exe
|
||||
7z a ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
||||
7z a ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
||||
popd
|
||||
|
||||
pushd publish_sdl2_headless
|
||||
7z a ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
||||
popd
|
||||
|
||||
pushd publish_ava
|
||||
mv publish/Ryujinx.exe publish/Ryujinx.Ava.exe
|
||||
7z a ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
||||
popd
|
||||
shell: bash
|
||||
|
||||
- name: Packing Linux builds
|
||||
if: matrix.platform.os == 'ubuntu-latest'
|
||||
run: |
|
||||
pushd publish_ava
|
||||
chmod +x publish/Ryujinx.sh publish/Ryujinx
|
||||
cp publish/Ryujinx publish/Ryujinx.Ava
|
||||
chmod +x publish/Ryujinx.sh publish/Ryujinx.Ava publish/Ryujinx
|
||||
tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
||||
tar -czvf ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
||||
popd
|
||||
|
||||
pushd publish_sdl2_headless
|
||||
chmod +x publish/Ryujinx.sh publish/Ryujinx.Headless.SDL2
|
||||
tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
||||
popd
|
||||
|
||||
pushd publish_ava
|
||||
mv publish/Ryujinx publish/Ryujinx.Ava
|
||||
chmod +x publish/Ryujinx.sh publish/Ryujinx.Ava
|
||||
tar -czvf ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
||||
popd
|
||||
shell: bash
|
||||
|
||||
- name: Pushing new release
|
||||
|
@@ -46,7 +46,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
private const int MinCountForDeletion = 32;
|
||||
private const int MaxCapacity = 2048;
|
||||
private const ulong MaxTextureSizeCapacity = 512 * 1024 * 1024; // MB;
|
||||
private const ulong MaxTextureSizeCapacity = 1024 * 1024 * 1024; // MB;
|
||||
|
||||
private readonly LinkedList<Texture> _textures;
|
||||
private ulong _totalSize;
|
||||
|
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||
private const ushort FileFormatVersionMajor = 1;
|
||||
private const ushort FileFormatVersionMinor = 2;
|
||||
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
||||
private const uint CodeGenVersion = 6455;
|
||||
private const uint CodeGenVersion = 6462;
|
||||
|
||||
private const string SharedTocFileName = "shared.toc";
|
||||
private const string SharedDataFileName = "shared.data";
|
||||
|
@@ -356,6 +356,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||
|
||||
context.AddGlobalVariable(perVertexInputVariable);
|
||||
context.Inputs.Add(new IoDefinition(StorageKind.Input, IoVariable.Position), perVertexInputVariable);
|
||||
|
||||
if (context.Definitions.Stage == ShaderStage.Geometry &&
|
||||
context.Definitions.GpPassthrough &&
|
||||
context.HostCapabilities.SupportsGeometryShaderPassthrough)
|
||||
{
|
||||
context.MemberDecorate(perVertexInputStructType, 0, Decoration.PassthroughNV);
|
||||
context.MemberDecorate(perVertexInputStructType, 1, Decoration.PassthroughNV);
|
||||
context.MemberDecorate(perVertexInputStructType, 2, Decoration.PassthroughNV);
|
||||
context.MemberDecorate(perVertexInputStructType, 3, Decoration.PassthroughNV);
|
||||
}
|
||||
}
|
||||
|
||||
var perVertexOutputStructType = CreatePerVertexStructType(context);
|
||||
|
@@ -298,7 +298,14 @@ namespace Ryujinx.Modules
|
||||
else
|
||||
{
|
||||
// Find the process name.
|
||||
string ryuName = Path.GetFileName(Environment.ProcessPath);
|
||||
string ryuName = Path.GetFileName(Environment.ProcessPath) ?? string.Empty;
|
||||
|
||||
// Migration: Start the updated binary.
|
||||
// TODO: Remove this in a future update.
|
||||
if (ryuName.StartsWith("Ryujinx.Ava"))
|
||||
{
|
||||
ryuName = ryuName.Replace(".Ava", "");
|
||||
}
|
||||
|
||||
// Some operating systems can see the renamed executable, so strip off the .ryuold if found.
|
||||
if (ryuName.EndsWith(".ryuold"))
|
||||
@@ -307,7 +314,7 @@ namespace Ryujinx.Modules
|
||||
}
|
||||
|
||||
// Fallback if the executable could not be found.
|
||||
if (!Path.Exists(Path.Combine(executableDirectory, ryuName)))
|
||||
if (ryuName.Length == 0 || !Path.Exists(Path.Combine(executableDirectory, ryuName)))
|
||||
{
|
||||
ryuName = OperatingSystem.IsWindows() ? "Ryujinx.exe" : "Ryujinx";
|
||||
}
|
||||
@@ -759,6 +766,43 @@ namespace Ryujinx.Modules
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
|
||||
// Migration: Delete old Ryujinx binary.
|
||||
// TODO: Remove this in a future update.
|
||||
if (!OperatingSystem.IsMacOS())
|
||||
{
|
||||
string[] oldRyuFiles = Directory.GetFiles(_homeDir, "Ryujinx.Ava*", SearchOption.TopDirectoryOnly);
|
||||
// Assume we are running the new one if the process path is not available.
|
||||
// This helps to prevent an infinite loop of restarts.
|
||||
string currentRyuName = Path.GetFileName(Environment.ProcessPath) ?? (OperatingSystem.IsWindows() ? "Ryujinx.exe" : "Ryujinx");
|
||||
|
||||
string newRyuName = Path.Combine(_homeDir, currentRyuName.Replace(".Ava", ""));
|
||||
if (!currentRyuName.Contains("Ryujinx.Ava"))
|
||||
{
|
||||
foreach (string oldRyuFile in oldRyuFiles)
|
||||
{
|
||||
File.Delete(oldRyuFile);
|
||||
}
|
||||
}
|
||||
// Should we be running the old binary, start the new one if possible.
|
||||
else if (File.Exists(newRyuName))
|
||||
{
|
||||
ProcessStartInfo processStart = new(newRyuName)
|
||||
{
|
||||
UseShellExecute = true,
|
||||
WorkingDirectory = _homeDir,
|
||||
};
|
||||
|
||||
foreach (string argument in CommandLineState.Arguments)
|
||||
{
|
||||
processStart.ArgumentList.Add(argument);
|
||||
}
|
||||
|
||||
Process.Start(processStart);
|
||||
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -8,6 +8,8 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
[SupportedOSPlatform("windows")]
|
||||
internal partial class Win32NativeInterop
|
||||
{
|
||||
internal const int GWLP_WNDPROC = -4;
|
||||
|
||||
[Flags]
|
||||
public enum ClassStyles : uint
|
||||
{
|
||||
@@ -29,22 +31,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
[SuppressMessage("Design", "CA1069: Enums values should not be duplicated")]
|
||||
public enum WindowsMessages : uint
|
||||
{
|
||||
Mousemove = 0x0200,
|
||||
Lbuttondown = 0x0201,
|
||||
Lbuttonup = 0x0202,
|
||||
Lbuttondblclk = 0x0203,
|
||||
Rbuttondown = 0x0204,
|
||||
Rbuttonup = 0x0205,
|
||||
Rbuttondblclk = 0x0206,
|
||||
Mbuttondown = 0x0207,
|
||||
Mbuttonup = 0x0208,
|
||||
Mbuttondblclk = 0x0209,
|
||||
Mousewheel = 0x020A,
|
||||
Xbuttondown = 0x020B,
|
||||
Xbuttonup = 0x020C,
|
||||
Xbuttondblclk = 0x020D,
|
||||
Mousehwheel = 0x020E,
|
||||
Mouselast = 0x020E,
|
||||
NcHitTest = 0x0084,
|
||||
}
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
||||
@@ -121,5 +108,11 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
IntPtr hMenu,
|
||||
IntPtr hInstance,
|
||||
IntPtr lpParam);
|
||||
|
||||
[LibraryImport("user32.dll", SetLastError = true)]
|
||||
public static partial IntPtr SetWindowLongPtrW(IntPtr hWnd, int nIndex, IntPtr value);
|
||||
|
||||
[LibraryImport("user32.dll", SetLastError = true)]
|
||||
public static partial IntPtr SetWindowLongW(IntPtr hWnd, int nIndex, int value);
|
||||
}
|
||||
}
|
||||
|
@@ -141,80 +141,10 @@ namespace Ryujinx.Ava.UI.Renderer
|
||||
|
||||
_wndProcDelegate = delegate (IntPtr hWnd, WindowsMessages msg, IntPtr wParam, IntPtr lParam)
|
||||
{
|
||||
if (VisualRoot != null)
|
||||
switch (msg)
|
||||
{
|
||||
if (msg == WindowsMessages.Lbuttondown ||
|
||||
msg == WindowsMessages.Rbuttondown ||
|
||||
msg == WindowsMessages.Lbuttonup ||
|
||||
msg == WindowsMessages.Rbuttonup ||
|
||||
msg == WindowsMessages.Mousemove)
|
||||
{
|
||||
Point rootVisualPosition = this.TranslatePoint(new Point((long)lParam & 0xFFFF, (long)lParam >> 16 & 0xFFFF), this).Value;
|
||||
Pointer pointer = new(0, PointerType.Mouse, true);
|
||||
|
||||
#pragma warning disable CS0618 // Type or member is obsolete (As of Avalonia 11, the constructors for PointerPressedEventArgs & PointerEventArgs are marked as obsolete)
|
||||
switch (msg)
|
||||
{
|
||||
case WindowsMessages.Lbuttondown:
|
||||
case WindowsMessages.Rbuttondown:
|
||||
{
|
||||
bool isLeft = msg == WindowsMessages.Lbuttondown;
|
||||
RawInputModifiers pointerPointModifier = isLeft ? RawInputModifiers.LeftMouseButton : RawInputModifiers.RightMouseButton;
|
||||
PointerPointProperties properties = new(pointerPointModifier, isLeft ? PointerUpdateKind.LeftButtonPressed : PointerUpdateKind.RightButtonPressed);
|
||||
|
||||
var evnt = new PointerPressedEventArgs(
|
||||
this,
|
||||
pointer,
|
||||
this,
|
||||
rootVisualPosition,
|
||||
(ulong)Environment.TickCount64,
|
||||
properties,
|
||||
KeyModifiers.None);
|
||||
|
||||
RaiseEvent(evnt);
|
||||
|
||||
break;
|
||||
}
|
||||
case WindowsMessages.Lbuttonup:
|
||||
case WindowsMessages.Rbuttonup:
|
||||
{
|
||||
bool isLeft = msg == WindowsMessages.Lbuttonup;
|
||||
RawInputModifiers pointerPointModifier = isLeft ? RawInputModifiers.LeftMouseButton : RawInputModifiers.RightMouseButton;
|
||||
PointerPointProperties properties = new(pointerPointModifier, isLeft ? PointerUpdateKind.LeftButtonReleased : PointerUpdateKind.RightButtonReleased);
|
||||
|
||||
var evnt = new PointerReleasedEventArgs(
|
||||
this,
|
||||
pointer,
|
||||
this,
|
||||
rootVisualPosition,
|
||||
(ulong)Environment.TickCount64,
|
||||
properties,
|
||||
KeyModifiers.None,
|
||||
isLeft ? MouseButton.Left : MouseButton.Right);
|
||||
|
||||
RaiseEvent(evnt);
|
||||
|
||||
break;
|
||||
}
|
||||
case WindowsMessages.Mousemove:
|
||||
{
|
||||
var evnt = new PointerEventArgs(
|
||||
PointerMovedEvent,
|
||||
this,
|
||||
pointer,
|
||||
this,
|
||||
rootVisualPosition,
|
||||
(ulong)Environment.TickCount64,
|
||||
new PointerPointProperties(RawInputModifiers.None, PointerUpdateKind.Other),
|
||||
KeyModifiers.None);
|
||||
|
||||
RaiseEvent(evnt);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
case WindowsMessages.NcHitTest:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
@@ -234,6 +164,8 @@ namespace Ryujinx.Ava.UI.Renderer
|
||||
|
||||
WindowHandle = CreateWindowEx(0, _className, "NativeWindow", WindowStyles.WsChild, 0, 0, 640, 480, control.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
||||
|
||||
SetWindowLongPtrW(control.Handle, GWLP_WNDPROC, wndClassEx.lpfnWndProc);
|
||||
|
||||
Marshal.FreeHGlobal(wndClassEx.lpszClassName);
|
||||
|
||||
return new PlatformHandle(WindowHandle, "HWND");
|
||||
|
Reference in New Issue
Block a user