1
1
import windows , os , winsharedutils , re , functools
2
2
from qtsymbols import *
3
- from myutils .config import savehook_new_data , get_launchpath , globalconfig , get_platform , _TR
3
+ from myutils .config import (
4
+ savehook_new_data ,
5
+ get_launchpath ,
6
+ globalconfig ,
7
+ get_platform ,
8
+ _TR ,
9
+ )
4
10
from gui .usefulwidget import getlineedit , getsimplecombobox , getsimplepatheditor
5
11
from traceback import print_exc
6
12
import xml .etree .ElementTree as ET
@@ -377,8 +383,9 @@ def run(self, gameexe, argsdict):
377
383
x64tools = [lr_internal , NTLEAS64 , CommandLine , Direct ]
378
384
379
385
380
- def getgamecamptools (gameexe ):
381
- b = windows .GetBinaryType (gameexe )
386
+ def getgamecamptools (gameexe , b = None ):
387
+ if b is None :
388
+ b = windows .GetBinaryType (gameexe )
382
389
if b == 6 :
383
390
_methods = x64tools
384
391
else :
@@ -399,10 +406,11 @@ def fundlauncher(_id):
399
406
400
407
def localeswitchedrun (gameuid ):
401
408
config = savehook_new_data [gameuid ]
402
- launch_method = config .get ("launch_method" , None )
403
409
gameexe = get_launchpath (gameuid )
404
410
gameexe = os .path .abspath (gameexe )
405
- tools = getgamecamptools (gameexe )
411
+ b = windows .GetBinaryType (gameexe )
412
+ launch_method = config .get ("launch_method" , {6 : "direct" , 0 : "le" }.get (b ))
413
+ tools = getgamecamptools (gameexe , b )
406
414
ids = [_ .id for _ in tools ]
407
415
if launch_method not in ids :
408
416
index = 0
0 commit comments