Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: convert patches to -Np1
```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

17 lines
451 B
Diff

--- a/src/linux_uinput.cpp 2015-11-09 11:19:35.000000000 +0100
+++ b/src/linux_uinput.cpp 2020-12-06 17:53:41.472516394 +0100
@@ -289,9 +289,12 @@
needs_sync = true;
struct input_event ev;
+ struct timeval tv;
memset(&ev, 0, sizeof(ev));
- gettimeofday(&ev.time, NULL);
+ gettimeofday(&tv, NULL);
+ ev.input_event_sec = tv.tv_sec;
+ ev.input_event_usec = tv.tv_usec;
ev.type = type;
ev.code = code;
if (ev.type == EV_KEY)