mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 18:05:34 +00:00
Added screenshot capability.
This commit is contained in:
parent
e10d37418f
commit
57afab2496
|
@ -46,6 +46,7 @@ namespace Examples.WinForms
|
|||
base.OnLoad(e);
|
||||
|
||||
glControl.KeyDown += new KeyEventHandler(glControl_KeyDown);
|
||||
glControl.KeyUp += new KeyEventHandler(glControl_KeyUp);
|
||||
//glControl.Resize += new EventHandler(glControl_Resize);
|
||||
glControl.Paint += new PaintEventHandler(glControl_Paint);
|
||||
|
||||
|
@ -62,6 +63,12 @@ namespace Examples.WinForms
|
|||
//glControl_Resize(glControl, EventArgs.Empty);
|
||||
}
|
||||
|
||||
void glControl_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.F12)
|
||||
glControl.GrabScreenshot().Save("screenshot.png");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnClosing
|
||||
|
|
Loading…
Reference in a new issue