void-packages/srcpkgs/fingerprint-gui/patches/time64.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

29 lines
936 B
Diff

Index: src/FingerprintHelper.cpp
===================================================================
--- a/src/FingerprintHelper.cpp
+++ b/src/FingerprintHelper.cpp
@@ -75,9 +75,12 @@ void pluginMessage(const char *msg){
// Send <enter> to uinput
bool uinputSendEnter(int uinput){
struct input_event event;
+ struct timeval tv = { 0, 0 };
memset(&event,0,sizeof(event));
// PRESS
- gettimeofday(&event.time,NULL);
+ gettimeofday(&tv,NULL);
+ event.input_event_sec = tv.tv_sec;
+ event.input_event_usec = tv.tv_usec;
event.type=EV_KEY;
event.code=KEY_ENTER;
event.value=1;
@@ -93,7 +96,9 @@ bool uinputSendEnter(int uinput){
return false;
}
// RELEASE
- gettimeofday(&event.time,NULL);
+ gettimeofday(&tv,NULL);
+ event.input_event_sec = tv.tv_sec;
+ event.input_event_usec = tv.tv_usec;
event.type=EV_KEY;
event.code=KEY_ENTER;
event.value=0;