From 673841d1dfaba8519b6d90133c19352ababbfb46 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Mon, 16 Jul 2018 17:31:52 +0200 Subject: [PATCH] Dump frame when F10 pressed --- core/linux-dist/x11.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/linux-dist/x11.cpp b/core/linux-dist/x11.cpp index a2e20848e..251c35515 100644 --- a/core/linux-dist/x11.cpp +++ b/core/linux-dist/x11.cpp @@ -41,6 +41,8 @@ bool x11_fullscreen = false; void* x11_vis; Atom wmDeleteMessage; +extern bool dump_frame_switch; + enum { _NET_WM_STATE_REMOVE =0, @@ -98,7 +100,13 @@ void input_x11_handle() { start_shutdown(); } -#if FEAT_HAS_NIXPROF +#ifndef RELEASE + else if (e.xkey.keycode == 76) // F10 button + { + // Dump the next frame into a file + dump_frame_switch = e.type == KeyPress; + } +#elif FEAT_HAS_NIXPROF else if (e.type == KeyRelease && e.xkey.keycode == 76) // F10 button { if (sample_Switch(3000)) {