From 2ca3cae57c710bdfce677ce65b24af82de3e270e Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 6 Oct 2022 03:52:02 -0400 Subject: [PATCH] Try a new method of detecting translation dictionary because just copying the file into place means it gets imported every time. --- audiogame-manager.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 654c7ea..bd45148 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -784,13 +784,13 @@ game_launcher() { fi if [[ "$game" =~ bokurano-daibouken-3 ]]; then dictPath="$(winepath "${winePath}")" - if [[ -r "${cache}/bk3-dict.dat" ]] && [[ ! -r "${dictPath}/dict.dat" ]]; then + if [[ -r "${cache}/bk3-dict.dat" ]] && [[ ! -d "${dictPath}/dict" ]]; then cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat" fi - if [[ -r "${dictPath}/dict.dat" ]]; then + if [[ -d "${dictPath}/dict" ]]; then pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd & fi - if [[ ! -r "${dictPath}/dict.dat" ]]; then + if [[ ! -d "${dictPath}/dict" ]]; then find "${WINEPREFIX}/drive_c/nyanchangame/bk3" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; "${0%/*}/speech/clipboard_translator.sh" play.exe & fi