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