Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Jan 6, 2025
1 parent 1ca1315 commit db53b2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cpp/version.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

set(VERSION_MAJOR 6)
set(VERSION_MINOR 17)
set(VERSION_PATCH 3)
set(VERSION_PATCH 4)
set(VERSION_REVISION 0)
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)
Expand Down
18 changes: 13 additions & 5 deletions py/LunaTranslator/myutils/localetools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import windows, os, winsharedutils, re, functools
from qtsymbols import *
from myutils.config import savehook_new_data, get_launchpath, globalconfig, get_platform, _TR
from myutils.config import (
savehook_new_data,
get_launchpath,
globalconfig,
get_platform,
_TR,
)
from gui.usefulwidget import getlineedit, getsimplecombobox, getsimplepatheditor
from traceback import print_exc
import xml.etree.ElementTree as ET
Expand Down Expand Up @@ -377,8 +383,9 @@ def run(self, gameexe, argsdict):
x64tools = [lr_internal, NTLEAS64, CommandLine, Direct]


def getgamecamptools(gameexe):
b = windows.GetBinaryType(gameexe)
def getgamecamptools(gameexe, b=None):
if b is None:
b = windows.GetBinaryType(gameexe)
if b == 6:
_methods = x64tools
else:
Expand All @@ -399,10 +406,11 @@ def fundlauncher(_id):

def localeswitchedrun(gameuid):
config = savehook_new_data[gameuid]
launch_method = config.get("launch_method", None)
gameexe = get_launchpath(gameuid)
gameexe = os.path.abspath(gameexe)
tools = getgamecamptools(gameexe)
b = windows.GetBinaryType(gameexe)
launch_method = config.get("launch_method", {6: "direct", 0: "le"}.get(b))
tools = getgamecamptools(gameexe, b)
ids = [_.id for _ in tools]
if launch_method not in ids:
index = 0
Expand Down

0 comments on commit db53b2f

Please sign in to comment.