Skip to content

Commit f3d3f6d

Browse files
Try to fix one weird behaviour with window_handler about services
1 parent fb7179e commit f3d3f6d

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

app/src/main/java/com/micewine/emu/activities/MainActivity.kt

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -614,19 +614,11 @@ class MainActivity : AppCompatActivity() {
614614
}
615615
}
616616

617-
lifecycleScope.launch {
618-
withContext(Dispatchers.IO) {
619-
if (exePath == "") {
620-
WineWrapper.wine("explorer /desktop=shell,$selectedResolution window_handler", winePrefix)
621-
} else {
622-
WineWrapper.wine("start /unix C:\\\\windows\\\\window_handler.exe", winePrefix)
623-
}
624-
}
625-
}
626-
627617
if (exePath == "") {
628-
WineWrapper.wine("explorer /desktop=shell,$selectedResolution TFM", winePrefix)
618+
WineWrapper.wine("explorer /desktop=shell,$selectedResolution window_handler TFM", winePrefix)
629619
} else {
620+
WineWrapper.wine("start /unix C:\\\\windows\\\\window_handler.exe", winePrefix)
621+
630622
if (exePath.endsWith(".lnk")) {
631623
try {
632624
val shell = ShellLink(exePath)
@@ -642,9 +634,6 @@ class MainActivity : AppCompatActivity() {
642634
}
643635
}
644636
else {
645-
// Wait for window_handler
646-
WineWrapper.waitFor("window_handler.exe", winePrefix)
647-
648637
WineWrapper.wine("'$exePath'", winePrefix, "'${File(exePath).parent!!}'")
649638
}
650639
}

app/src/main/java/com/micewine/emu/core/WineWrapper.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import android.os.Build
44
import com.micewine.emu.core.EnvVars.getEnv
55
import com.micewine.emu.core.ShellLoader.runCommand
66
import com.micewine.emu.core.ShellLoader.runCommandWithOutput
7-
import kotlinx.coroutines.delay
87
import java.io.File
98

109
object WineWrapper {

0 commit comments

Comments
 (0)