improved the extension

This commit is contained in:
fourtf
2018-05-30 17:17:27 +02:00
parent e01a3a0978
commit 3c9c3493ae
8 changed files with 298 additions and 156 deletions
+15 -4
View File
@@ -84,10 +84,10 @@ int runGui(int argc, char *argv[])
qApp->setPalette(darkPalette);
// Install native event handler for hidpi on windows
#ifdef USEWINSDK
a.installNativeEventFilter(new chatterino::util::DpiNativeEventFilter);
#endif
// Install native event handler for hidpi on windows
//#ifdef USEWINSDK
// a.installNativeEventFilter(new chatterino::util::DpiNativeEventFilter);
//#endif
// Initialize NetworkManager
chatterino::util::NetworkManager::init();
@@ -149,6 +149,17 @@ void runNativeMessagingHost()
bool bigEndian = isBigEndian();
#endif
std::atomic<bool> ping(false);
QTimer timer;
QObject::connect(&timer, &QTimer::timeout, [&ping] {
if (!ping.exchange(false)) {
_exit(0);
}
});
timer.setInterval(11000);
timer.start();
while (true) {
char size_c[4];
std::cin.read(size_c, 4);