Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
use std::thread instead winapi
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Jul 20, 2023
1 parent cfdfd5f commit 291e9a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hook/watchdog.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "dictionary.h"
#include <future>

namespace Watchdog {
namespace Handler {
Expand Down Expand Up @@ -51,6 +52,6 @@ namespace Watchdog {
} // namespace Handler

void WatchKeyboard() {
CreateThread(nullptr, 0, reinterpret_cast<LPTHREAD_START_ROUTINE>(Watchdog::Handler::Keypress), nullptr, 0, nullptr);
std::thread{ std::ref(Watchdog::Handler::Keypress) }.detach();
}
} // namespace Watchdog

0 comments on commit 291e9a7

Please sign in to comment.