From fdcc4be654d6e9b24bb13efb885a29c1492ebd60 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 22 Mar 2017 15:08:14 +0300 Subject: [PATCH] Handle console input in fbdev mode --- samples/ControlCatalog.NetCore/Program.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/samples/ControlCatalog.NetCore/Program.cs b/samples/ControlCatalog.NetCore/Program.cs index f1146de013..ac7429cfd4 100644 --- a/samples/ControlCatalog.NetCore/Program.cs +++ b/samples/ControlCatalog.NetCore/Program.cs @@ -8,13 +8,22 @@ namespace ControlCatalog.NetCore { static void Main(string[] args) { - if (args.Contains("--fbdev")) - AppBuilder.Configure() - .InitializeWithLinuxFramebuffer(tl => tl.Content = new MainView()); + if (args.Contains("--fbdev")) AppBuilder.Configure().InitializeWithLinuxFramebuffer(tl => + { + tl.Content = new MainView(); + System.Threading.ThreadPool.QueueUserWorkItem(_ => ConsoleSilencer()); + }); else AppBuilder.Configure() .UsePlatformDetect() .Start(); } + + static void ConsoleSilencer() + { + Console.CursorVisible = false; + while (true) + Console.ReadKey(); + } } } \ No newline at end of file