summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-02 16:19:11 -0700
committerJacob Palecki <[email protected]>2020-09-02 16:19:11 -0700
commit6b5fdf4e593c056df13de325fea7b6b35fbb750e (patch)
tree7f53e3be86a17097aafad43738a34e7c665cfcd0 /common
parentMerge pull request #1 from Sidiouth/sidi (diff)
parentMerge pull request #18 from a1xd/write-delay (diff)
downloadrawaccel-6b5fdf4e593c056df13de325fea7b6b35fbb750e.tar.xz
rawaccel-6b5fdf4e593c056df13de325fea7b6b35fbb750e.zip
Merge remote-tracking branch 'upstream/master' into master
Diffstat (limited to 'common')
-rw-r--r--common/rawaccel-error.hpp5
-rw-r--r--common/rawaccel-io.hpp5
2 files changed, 1 insertions, 9 deletions
diff --git a/common/rawaccel-error.hpp b/common/rawaccel-error.hpp
index f5498f9..ecee526 100644
--- a/common/rawaccel-error.hpp
+++ b/common/rawaccel-error.hpp
@@ -21,9 +21,4 @@ namespace rawaccel {
install_error() : io_error("rawaccel is not installed") {}
};
- class cooldown_error : public io_error {
- public:
- cooldown_error() : io_error("write is on cooldown") {}
- };
-
}
diff --git a/common/rawaccel-io.hpp b/common/rawaccel-io.hpp
index 74e2d1e..e8641d1 100644
--- a/common/rawaccel-io.hpp
+++ b/common/rawaccel-io.hpp
@@ -74,10 +74,7 @@ namespace rawaccel {
CloseHandle(ra_handle);
if (!success) {
- if (auto err = GetLastError(); err != ERROR_BUSY) {
- throw std::system_error(err, std::system_category(), "DeviceIoControl failed");
- }
- throw cooldown_error();
+ throw std::system_error(GetLastError(), std::system_category(), "DeviceIoControl failed");
}
}