Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
5b3662b793 | |||
1329c47ea4 | |||
6bce46621c | |||
e6e5838916 | |||
51065d9129 | |||
6228331fd1 | |||
98e7c33630 | |||
5c3cfb84c0 | |||
55557525b1 | |||
7e6342e44d | |||
c3555cb5d6 |
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@ -25,7 +25,7 @@ env:
|
||||
jobs:
|
||||
tag:
|
||||
name: Create tag
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Get version info
|
||||
id: version_info
|
||||
@ -156,11 +156,11 @@ jobs:
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Setup LLVM 14
|
||||
- name: Setup LLVM 15
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 14
|
||||
sudo ./llvm.sh 15
|
||||
|
||||
- name: Install rcodesign
|
||||
run: |
|
||||
@ -215,4 +215,4 @@ jobs:
|
||||
needs: release
|
||||
with:
|
||||
ryujinx_version: "1.1.${{ github.run_number }}"
|
||||
secrets: inherit
|
||||
secrets: inherit
|
||||
|
@ -43,7 +43,7 @@
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.0</string>
|
||||
<string>12.0</string>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
@ -155,4 +155,4 @@
|
||||
<string>200000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
</plist>
|
||||
|
@ -14,7 +14,7 @@
|
||||
"MenuBarFileOpenEmuFolder": "Open Ryujinx Folder",
|
||||
"MenuBarFileOpenLogsFolder": "Open Logs Folder",
|
||||
"MenuBarFileExit": "_Exit",
|
||||
"MenuBarOptions": "Options",
|
||||
"MenuBarOptions": "_Options",
|
||||
"MenuBarOptionsToggleFullscreen": "Toggle Fullscreen",
|
||||
"MenuBarOptionsStartGamesInFullscreen": "Start Games in Fullscreen Mode",
|
||||
"MenuBarOptionsStopEmulation": "Stop Emulation",
|
||||
@ -30,7 +30,7 @@
|
||||
"MenuBarToolsManageFileTypes": "Manage file types",
|
||||
"MenuBarToolsInstallFileTypes": "Install file types",
|
||||
"MenuBarToolsUninstallFileTypes": "Uninstall file types",
|
||||
"MenuBarHelp": "Help",
|
||||
"MenuBarHelp": "_Help",
|
||||
"MenuBarHelpCheckForUpdates": "Check for Updates",
|
||||
"MenuBarHelpAbout": "About",
|
||||
"MenuSearch": "Search...",
|
||||
|
@ -12,6 +12,11 @@
|
||||
Click="ToggleFavorite_Click"
|
||||
Header="{locale:Locale GameListContextMenuToggleFavorite}"
|
||||
ToolTip.Tip="{locale:Locale GameListContextMenuToggleFavoriteToolTip}" />
|
||||
<MenuItem
|
||||
Click="CreateApplicationShortcut_Click"
|
||||
Header="{locale:Locale GameListContextMenuCreateShortcut}"
|
||||
IsEnabled="{Binding CreateShortcutEnabled}"
|
||||
ToolTip.Tip="{locale:Locale GameListContextMenuCreateShortcutToolTip}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
Click="OpenUserSaveDirectory_Click"
|
||||
@ -82,9 +87,4 @@
|
||||
Header="{locale:Locale GameListContextMenuExtractDataLogo}"
|
||||
ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataLogoToolTip}" />
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
Click="CreateApplicationShortcut_Click"
|
||||
Header="{locale:Locale GameListContextMenuCreateShortcut}"
|
||||
IsEnabled="{Binding CreateShortcutEnabled}"
|
||||
ToolTip.Tip="{locale:Locale GameListContextMenuCreateShortcutToolTip}" />
|
||||
</MenuFlyout>
|
||||
|
@ -279,7 +279,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
||||
bool completeSource = IsTextureCopyComplete(src, srcLinear, srcBpp, srcStride, xCount, yCount);
|
||||
bool completeDest = IsTextureCopyComplete(dst, dstLinear, dstBpp, dstStride, xCount, yCount);
|
||||
|
||||
if (completeSource && completeDest)
|
||||
// Try to set the texture data directly,
|
||||
// but only if we are doing a complete copy,
|
||||
// and not for block linear to linear copies, since those are typically accessed from the CPU.
|
||||
|
||||
if (completeSource && completeDest && !(dstLinear && !srcLinear))
|
||||
{
|
||||
var target = memoryManager.Physical.TextureCache.FindTexture(
|
||||
memoryManager,
|
||||
|
@ -102,9 +102,9 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
public bool AlwaysFlushOnOverlap { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the texture was fully unmapped since the modified flag was set, and flushes should be ignored until it is modified again.
|
||||
/// Indicates that the texture was modified since the last time it was flushed.
|
||||
/// </summary>
|
||||
public bool FlushStale { get; private set; }
|
||||
public bool ModifiedSinceLastFlush { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Increments when the host texture is swapped, or when the texture is removed from all pools.
|
||||
@ -1417,7 +1417,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
/// </summary>
|
||||
public void SignalModified()
|
||||
{
|
||||
FlushStale = false;
|
||||
_scaledSetScore = Math.Max(0, _scaledSetScore - 1);
|
||||
|
||||
if (_modifiedStale || Group.HasCopyDependencies)
|
||||
@ -1438,14 +1437,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
if (bound)
|
||||
{
|
||||
FlushStale = false;
|
||||
_scaledSetScore = Math.Max(0, _scaledSetScore - 1);
|
||||
}
|
||||
|
||||
if (_modifiedStale || Group.HasCopyDependencies || Group.HasFlushBuffer)
|
||||
{
|
||||
_modifiedStale = false;
|
||||
Group.SignalModifying(this, bound);
|
||||
Group.SignalModifying(this, bound, bound || ModifiedSinceLastFlush || Group.HasCopyDependencies || Group.HasFlushBuffer);
|
||||
}
|
||||
|
||||
_physicalMemory.TextureCache.Lift(this);
|
||||
@ -1703,12 +1701,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
/// <param name="unmapRange">The range of memory being unmapped</param>
|
||||
public void Unmapped(MultiRange unmapRange)
|
||||
{
|
||||
if (unmapRange.Contains(Range))
|
||||
{
|
||||
// If this is a full unmap, prevent flushes until the texture is mapped again.
|
||||
FlushStale = true;
|
||||
}
|
||||
|
||||
ChangedMapping = true;
|
||||
|
||||
if (Group.Storage == this)
|
||||
|
@ -709,7 +709,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
/// </summary>
|
||||
/// <param name="texture">The texture that has been modified</param>
|
||||
/// <param name="bound">True if this texture is being bound, false if unbound</param>
|
||||
public void SignalModifying(Texture texture, bool bound)
|
||||
/// <param name="setModified">Indicates if the modified flag should be set</param>
|
||||
public void SignalModifying(Texture texture, bool bound, bool setModified)
|
||||
{
|
||||
ModifiedSequence = _context.GetModifiedSequence();
|
||||
|
||||
@ -721,7 +722,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
TextureGroupHandle group = _handles[baseHandle + i];
|
||||
|
||||
group.SignalModifying(bound, _context);
|
||||
group.SignalModifying(bound, _context, setModified);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1660,13 +1661,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
}
|
||||
|
||||
// If size is zero, we have nothing to flush.
|
||||
// If the flush is stale, we should ignore it because the texture was unmapped since the modified
|
||||
// flag was set, and flushing it is not safe anymore as the GPU might no longer own the memory.
|
||||
if (size == 0 || Storage.FlushStale)
|
||||
if (size == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Storage.ModifiedSinceLastFlush = false;
|
||||
|
||||
// There is a small gap here where the action is removed but _actionRegistered is still 1.
|
||||
// In this case it will skip registering the action, but here we are already handling it,
|
||||
// so there shouldn't be any issue as it's the same handler for all actions.
|
||||
|
@ -304,9 +304,17 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
/// </summary>
|
||||
/// <param name="bound">True if this handle is being bound, false if unbound</param>
|
||||
/// <param name="context">The GPU context to register a sync action on</param>
|
||||
public void SignalModifying(bool bound, GpuContext context)
|
||||
/// <param name="setModified">Indicates if the modified flag should be set</param>
|
||||
public void SignalModifying(bool bound, GpuContext context, bool setModified)
|
||||
{
|
||||
SignalModified(context);
|
||||
if (setModified)
|
||||
{
|
||||
SignalModified(context);
|
||||
}
|
||||
else
|
||||
{
|
||||
RegisterSync(context);
|
||||
}
|
||||
|
||||
if (!bound && _syncActionRegistered && NextSyncCopies())
|
||||
{
|
||||
|
@ -413,21 +413,35 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
bool anyChanged = false;
|
||||
|
||||
if (_rtHostDs != _rtDepthStencil?.HostTexture)
|
||||
{
|
||||
_rtHostDs = _rtDepthStencil?.HostTexture;
|
||||
Texture dsTexture = _rtDepthStencil;
|
||||
ITexture hostDsTexture = null;
|
||||
|
||||
if (dsTexture != null)
|
||||
{
|
||||
hostDsTexture = dsTexture.HostTexture;
|
||||
dsTexture.ModifiedSinceLastFlush = true;
|
||||
}
|
||||
|
||||
if (_rtHostDs != hostDsTexture)
|
||||
{
|
||||
_rtHostDs = hostDsTexture;
|
||||
anyChanged = true;
|
||||
}
|
||||
|
||||
for (int index = 0; index < _rtColors.Length; index++)
|
||||
{
|
||||
ITexture hostTexture = _rtColors[index]?.HostTexture;
|
||||
Texture texture = _rtColors[index];
|
||||
ITexture hostTexture = null;
|
||||
|
||||
if (texture != null)
|
||||
{
|
||||
hostTexture = texture.HostTexture;
|
||||
texture.ModifiedSinceLastFlush = true;
|
||||
}
|
||||
|
||||
if (_rtHostColors[index] != hostTexture)
|
||||
{
|
||||
_rtHostColors[index] = hostTexture;
|
||||
|
||||
anyChanged = true;
|
||||
}
|
||||
}
|
||||
|
@ -784,7 +784,7 @@ namespace Ryujinx.Ui.Common.Configuration
|
||||
EnableDiscordIntegration.Value = true;
|
||||
CheckUpdatesOnStart.Value = true;
|
||||
ShowConfirmExit.Value = true;
|
||||
HideCursor.Value = HideCursorMode.Never;
|
||||
HideCursor.Value = HideCursorMode.OnIdle;
|
||||
Graphics.EnableVsync.Value = true;
|
||||
Graphics.EnableShaderCache.Value = true;
|
||||
Graphics.EnableTextureRecompression.Value = false;
|
||||
|
@ -30,7 +30,7 @@ namespace Ryujinx.Ui.Common.Helper
|
||||
graphic.DrawImage(image, 0, 0, 128, 128);
|
||||
SaveBitmapAsIcon(bitmap, iconPath);
|
||||
|
||||
var shortcut = Shortcut.CreateShortcut(basePath, GetArgsString(basePath, applicationFilePath), iconPath, 0);
|
||||
var shortcut = Shortcut.CreateShortcut(basePath, GetArgsString(applicationFilePath), iconPath, 0);
|
||||
shortcut.StringData.NameString = cleanedAppName;
|
||||
shortcut.WriteToFile(Path.Combine(desktopPath, cleanedAppName + ".lnk"));
|
||||
}
|
||||
@ -46,16 +46,16 @@ namespace Ryujinx.Ui.Common.Helper
|
||||
image.SaveAsPng(iconPath);
|
||||
|
||||
using StreamWriter outputFile = new(Path.Combine(desktopPath, cleanedAppName + ".desktop"));
|
||||
outputFile.Write(desktopFile, cleanedAppName, iconPath, GetArgsString(basePath, applicationFilePath));
|
||||
outputFile.Write(desktopFile, cleanedAppName, iconPath, $"{basePath} {GetArgsString(applicationFilePath)}");
|
||||
}
|
||||
|
||||
[SupportedOSPlatform("macos")]
|
||||
private static void CreateShortcutMacos(string appFilePath, byte[] iconData, string desktopPath, string cleanedAppName)
|
||||
{
|
||||
string basePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AppDomain.CurrentDomain.FriendlyName);
|
||||
string basePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ryujinx");
|
||||
var plistFile = EmbeddedResources.ReadAllText("Ryujinx.Ui.Common/shortcut-template.plist");
|
||||
// Macos .App folder
|
||||
string contentFolderPath = Path.Combine(desktopPath, cleanedAppName + ".app", "Contents");
|
||||
string contentFolderPath = Path.Combine("/Applications", cleanedAppName + ".app", "Contents");
|
||||
string scriptFolderPath = Path.Combine(contentFolderPath, "MacOS");
|
||||
|
||||
if (!Directory.Exists(scriptFolderPath))
|
||||
@ -69,7 +69,7 @@ namespace Ryujinx.Ui.Common.Helper
|
||||
using StreamWriter scriptFile = new(scriptPath);
|
||||
|
||||
scriptFile.WriteLine("#!/bin/sh");
|
||||
scriptFile.WriteLine(GetArgsString(basePath, appFilePath));
|
||||
scriptFile.WriteLine($"{basePath} {GetArgsString(appFilePath)}");
|
||||
|
||||
// Set execute permission
|
||||
FileInfo fileInfo = new(scriptPath);
|
||||
@ -125,13 +125,10 @@ namespace Ryujinx.Ui.Common.Helper
|
||||
throw new NotImplementedException("Shortcut support has not been implemented yet for this OS.");
|
||||
}
|
||||
|
||||
private static string GetArgsString(string basePath, string appFilePath)
|
||||
private static string GetArgsString(string appFilePath)
|
||||
{
|
||||
// args are first defined as a list, for easier adjustments in the future
|
||||
var argsList = new List<string>
|
||||
{
|
||||
basePath,
|
||||
};
|
||||
var argsList = new List<string>();
|
||||
|
||||
if (!string.IsNullOrEmpty(CommandLineState.BaseDirPathArg))
|
||||
{
|
||||
@ -141,7 +138,6 @@ namespace Ryujinx.Ui.Common.Helper
|
||||
|
||||
argsList.Add($"\"{appFilePath}\"");
|
||||
|
||||
|
||||
return String.Join(" ", argsList);
|
||||
}
|
||||
|
||||
|
@ -211,6 +211,8 @@ namespace Ryujinx.Ui.Widgets
|
||||
_manageSubMenu.Append(_openPtcDirMenuItem);
|
||||
_manageSubMenu.Append(_openShaderCacheDirMenuItem);
|
||||
|
||||
Add(_createShortcutMenuItem);
|
||||
Add(new SeparatorMenuItem());
|
||||
Add(_openSaveUserDirMenuItem);
|
||||
Add(_openSaveDeviceDirMenuItem);
|
||||
Add(_openSaveBcatDirMenuItem);
|
||||
@ -223,7 +225,6 @@ namespace Ryujinx.Ui.Widgets
|
||||
Add(new SeparatorMenuItem());
|
||||
Add(_manageCacheMenuItem);
|
||||
Add(_extractMenuItem);
|
||||
Add(_createShortcutMenuItem);
|
||||
|
||||
ShowAll();
|
||||
}
|
||||
|
Reference in New Issue
Block a user