Add Screenshot Feature (#2354)
* Add internal screenshot capabilities * update version notice
This commit is contained in:
parent
a79b39b913
commit
28618c58d7
12 changed files with 220 additions and 56 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue