improved the extension
This commit is contained in:
+15
-4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user