mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-09 01:42:34 -07:00
Add Screenshot Feature (#2354)
* Add internal screenshot capabilities * update version notice
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using ARMeilleure.Translation;
|
||||
using ARMeilleure.Translation.PTC;
|
||||
|
||||
using Gtk;
|
||||
|
||||
using LibHac.Common;
|
||||
using LibHac.FsSystem;
|
||||
using LibHac.FsSystem.NcaUtils;
|
||||
using LibHac.Ns;
|
||||
|
||||
using Ryujinx.Audio.Backends.Dummy;
|
||||
using Ryujinx.Audio.Backends.OpenAL;
|
||||
using Ryujinx.Audio.Backends.SDL2;
|
||||
@@ -31,13 +42,6 @@ using Ryujinx.Ui.Applet;
|
||||
using Ryujinx.Ui.Helper;
|
||||
using Ryujinx.Ui.Widgets;
|
||||
using Ryujinx.Ui.Windows;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using GUI = Gtk.Builder.ObjectAttribute;
|
||||
|
||||
@@ -96,6 +100,7 @@ namespace Ryujinx.Ui
|
||||
[GUI] MenuItem _stopEmulation;
|
||||
[GUI] MenuItem _simulateWakeUpMessage;
|
||||
[GUI] MenuItem _scanAmiibo;
|
||||
[GUI] MenuItem _takeScreenshot;
|
||||
[GUI] MenuItem _fullScreen;
|
||||
[GUI] CheckMenuItem _startFullScreen;
|
||||
[GUI] CheckMenuItem _favToggle;
|
||||
@@ -1377,7 +1382,8 @@ namespace Ryujinx.Ui
|
||||
|
||||
private void ActionMenu_StateChanged(object o, StateChangedArgs args)
|
||||
{
|
||||
_scanAmiibo.Sensitive = _emulationContext != null && _emulationContext.System.SearchingForAmiibo(out int _);
|
||||
_scanAmiibo.Sensitive = _emulationContext != null && _emulationContext.System.SearchingForAmiibo(out int _);
|
||||
_takeScreenshot.Sensitive = _emulationContext != null;
|
||||
}
|
||||
|
||||
private void Scan_Amiibo(object sender, EventArgs args)
|
||||
@@ -1402,6 +1408,14 @@ namespace Ryujinx.Ui
|
||||
}
|
||||
}
|
||||
|
||||
private void Take_Screenshot(object sender, EventArgs args)
|
||||
{
|
||||
if (_emulationContext != null && RendererWidget != null)
|
||||
{
|
||||
RendererWidget.ScreenshotRequested = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void AmiiboWindow_DeleteEvent(object sender, DeleteEventArgs args)
|
||||
{
|
||||
if (((AmiiboWindow)sender).AmiiboId != "" && ((AmiiboWindow)sender).Response == ResponseType.Ok)
|
||||
|
Reference in New Issue
Block a user