libfprint/SOURCES/0166-examples-Do-not-re-prompt-the-finger-when-repeating-.patch
2021-09-09 20:12:48 +00:00

34 lines
1.0 KiB
Diff

From 355debe411605f1afbd030fe8a14818138ac8479 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 2 Jan 2020 18:44:34 +0100
Subject: [PATCH 166/181] examples: Do not re-prompt the finger when repeating
verification
Let's assume the user will want to re-scan the same finger rather than
being prompted again to change it.
---
examples/verify.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/examples/verify.c b/examples/verify.c
index d85ce4e..7fcc64c 100644
--- a/examples/verify.c
+++ b/examples/verify.c
@@ -165,8 +165,11 @@ on_list_completed (FpDevice *dev, GAsyncResult *res, gpointer user_data)
static void
start_verification (FpDevice *dev, VerifyData *verify_data)
{
- g_print ("Choose the finger to verify:\n");
- verify_data->finger = finger_chooser ();
+ if (verify_data->finger == FP_FINGER_UNKNOWN)
+ {
+ g_print ("Choose the finger to verify:\n");
+ verify_data->finger = finger_chooser ();
+ }
if (verify_data->finger == FP_FINGER_UNKNOWN)
{
--
2.24.1