Skip to content

Commit

Permalink
Deactivate random sentences for non-EN
Browse files Browse the repository at this point in the history
  • Loading branch information
ZDisket committed Jun 9, 2022
1 parent 41f21fe commit 35bae2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ release/*
*.dll
*.exe

deps.zip
4 changes: 4 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@


// maybe hardcoding the sample sentences is a bad idea?
// ZDisket: I'm lazy
static const QString RandomTexts[] = {"Drink the water fishy",
"She turned herself into a thorn. It was the funniest shit I've ever seen",
"That was an order! Steiner's attack was an order!",
Expand Down Expand Up @@ -1902,6 +1903,9 @@ void MainWindow::on_btnClearTxt_clicked()

void MainWindow::on_btnRandom_clicked()
{
if (GetCurrentVoice()->GetInfo().s_Language.find("English") == std::string::npos)
return; // No random sent for other langs

std::random_device dev;
std::mt19937 rng(dev());
std::uniform_int_distribution<std::mt19937::result_type> dist6(0,21);
Expand Down

0 comments on commit 35bae2d

Please sign in to comment.