diff options
author | lilydjwg | 2015-07-25 13:15:39 +0800 |
---|---|---|
committer | lilydjwg | 2015-07-25 13:15:39 +0800 |
commit | fb4c89483394108b6f9bc07281e3d8f0effade00 (patch) | |
tree | 77732e81b04764aec1020e6c428835d0b81f1af1 /ascii.kbmode.patch | |
download | aur-fb4c89483394108b6f9bc07281e3d8f0effade00.tar.gz |
import from AUR3
Diffstat (limited to 'ascii.kbmode.patch')
-rw-r--r-- | ascii.kbmode.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ascii.kbmode.patch b/ascii.kbmode.patch new file mode 100644 index 000000000000..b0b698ef34d2 --- /dev/null +++ b/ascii.kbmode.patch @@ -0,0 +1,22 @@ +--- a/src/main.cpp 2006-05-13 18:36:45.000000000 +0800 ++++ b/src/main.cpp 2009-10-08 12:19:24.000000000 +0800 +@@ -44,6 +44,10 @@ HzDecoder *gpDecoder = NULL; + Zhcon *gpZhcon = NULL; + + int main(int argc, char* argv[]) { ++ int oldkbmode; ++ bool restore = false; ++ if (!ioctl(0, KDGKBMODE, &oldkbmode) && !ioctl(0, KDSKBMODE, K_XLATE)) ++ restore = true; + try { + Zhcon con(argc, argv); + gpZhcon = &con; +@@ -54,6 +58,8 @@ int main(int argc, char* argv[]) { + } catch (...) { + cerr << "unknown exception caught" << endl; + } ++ if (restore) ++ ioctl(0, KDSKBMODE, oldkbmode); + + return EXIT_SUCCESS; + } |