MCPcopy Create free account
hub / github.com/JibbSmart/JoyShockMapper / WriteToConsole

Function WriteToConsole

JoyShockMapper/src/linux/InputHelpers.cpp:561–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561bool WriteToConsole(const std::string &command)
562{
563 constexpr auto STDIN_FD{ 0 };
564
565 for (auto c : command)
566 {
567 if (::ioctl(STDIN_FD, TIOCSTI, &c) < 0)
568 {
569 perror("ioctl");
570 return false;
571 }
572 }
573
574 char NEW_LINE = '\n';
575 ::ioctl(STDIN_FD, TIOCSTI, &NEW_LINE);
576
577 return true;
578}
579
580BOOL ConsoleCtrlHandler(DWORD)
581{

Callers 2

terminateHandlerFunction · 0.70
beforeShowTrayMenuFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected