@@ -322,26 +322,6 @@ func isProcessRunningAtPath(exePath string) bool {
322322 return false
323323}
324324
325- func ensureVTConsole () {
326- h , _ := windows .GetStdHandle (windows .STD_OUTPUT_HANDLE )
327- var m uint32
328- if windows .GetConsoleMode (h , & m ) != nil {
329- kernel32 := syscall .NewLazyDLL ("kernel32.dll" )
330- alloc := kernel32 .NewProc ("AllocConsole" )
331- setcp := kernel32 .NewProc ("SetConsoleOutputCP" )
332- _ , _ , _ = alloc .Call ()
333- _ , _ , _ = setcp .Call (uintptr (65001 ))
334- h , _ = windows .GetStdHandle (windows .STD_OUTPUT_HANDLE )
335- _ = windows .GetConsoleMode (h , & m )
336- }
337- _ = windows .SetConsoleMode (h , m | 0x0004 )
338- eh , _ := windows .GetStdHandle (windows .STD_ERROR_HANDLE )
339- var em uint32
340- if windows .GetConsoleMode (eh , & em ) == nil {
341- _ = windows .SetConsoleMode (eh , em | 0x0004 )
342- }
343- }
344-
345325func (a * Minecraft ) SaveVersionMeta (name string , gameVersion string , typeStr string , enableIsolation bool , enableConsole bool , enableEditorMode bool ) string {
346326 vdir , err := utils .GetVersionsDir ()
347327 if err != nil || strings .TrimSpace (vdir ) == "" {
@@ -1398,7 +1378,6 @@ func (a *Minecraft) launchVersionInternal(name string, checkRunning bool) string
13981378 }
13991379 cmd := exec .Command (exe , args ... )
14001380 cmd .Dir = dir
1401- ensureVTConsole ()
14021381 cmd .Stdout = os .Stdout
14031382 cmd .Stderr = os .Stderr
14041383 cmd .Stdin = os .Stdin
0 commit comments