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