about summary refs log tree commit diff stats
path: root/src/tools/wine_tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wine_tools.c')
-rw-r--r--src/tools/wine_tools.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/tools/wine_tools.c b/src/tools/wine_tools.c
index 86a91598..e1fb72af 100644
--- a/src/tools/wine_tools.c
+++ b/src/tools/wine_tools.c
@@ -139,16 +139,14 @@ void dynarec_wine_prereserve()
 void DetectUnityPlayer(char* filename)
 {
     static int unityplayer_detected = 0;
-    if (!filename && BOX64ENV(unityplayer) && !unityplayer_detected) {
-        if (strlen(filename) > strlen("UnityPlayer.dll") && !strcasecmp(filename + strlen(filename) - strlen("UnityPlayer.dll"), "UnityPlayer.dll")) {
-            printf_log(LOG_NONE, "Detected UnityPlayer.dll\n");
+    if (filename && BOX64ENV(unityplayer) && !unityplayer_detected && !strcmp(filename, "unityplayer.dll")) {
+        printf_log(LOG_INFO, "Detected UnityPlayer.dll\n");
 #ifdef DYNAREC
-            if (!BOX64ENV(dynarec_strongmem)) {
-                SET_BOX64ENV(dynarec_strongmem, 1);
-                PrintEnvVariables(&box64env, LOG_INFO);
-            }
-#endif
-            unityplayer_detected = 1;
+        if (!BOX64ENV(dynarec_strongmem)) {
+            SET_BOX64ENV(dynarec_strongmem, 1);
+            PrintEnvVariables(&box64env, LOG_INFO);
         }
+#endif
+        unityplayer_detected = 1;
     }
 }