Skip to content

Commit

Permalink
unmute gently
Browse files Browse the repository at this point in the history
  • Loading branch information
tmarenko committed May 20, 2023
1 parent e6444fa commit 70ae5df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <csignal>
#include "tesseract.h"
#include "config.h"
#include <chrono>
#include <thread>


typedef struct GenshinWindowInfo {
Expand Down Expand Up @@ -269,13 +271,14 @@ int PaimonShutUp() {
bool isPaimonSpeaking = IsPaimonSpeaking(paimonName);
if (isPaimonSpeaking && !paimonWasHere) {
paimonWasHere = true;
std::cout << "Paimon, shut up!" << std::endl;
SetMuteGenshin(isPaimonSpeaking);
std::cout << "Paimon, shut up!" << std::endl;
}
if (!isPaimonSpeaking && paimonWasHere) {
std::this_thread::sleep_for(std::chrono::milliseconds(250));
paimonWasHere = false;
std::cout << "Unmuting the game." << std::endl;
SetMuteGenshin(isPaimonSpeaking);
std::cout << "Unmuting the game." << std::endl;
}
}
DestroyTesseract();
Expand Down

0 comments on commit 70ae5df

Please sign in to comment.