demo 0.6.0 兼容模式启动;sfx音效控制面板

This commit is contained in:
bbd_pc 2025-07-22 00:42:58 +08:00
parent b29e33f187
commit 520171f9ed
4 changed files with 13 additions and 14 deletions

View File

@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../demo0.5.3/xiandie.exe"
export_path="../demo0.6.0/xiandie.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
@ -37,8 +37,8 @@ application/modify_resources=true
application/icon="uid://cxgwspjv16j7m"
application/console_wrapper_icon="uid://cxgwspjv16j7m"
application/icon_interpolation=4
application/file_version="0.5.3.0"
application/product_version="0.5.3.0"
application/file_version="0.6.0.0"
application/product_version="0.6.0.0"
application/company_name="包包丁"
application/product_name="衔蝶"
application/file_description="衔蝶"

View File

@ -56,20 +56,19 @@ func _apply_compatibility() -> void:
# 重启游戏以应用新渲染器
var args = ["--rendering-driver", "opengl3"]
var executable_path = OS.get_executable_path()
var result = OS.create_process(executable_path, args)
if result == OK:
if OS.get_name() == "Windows":
# 使用线程来延迟退出
var thread = Thread.new()
thread.start(_delayed_quit)
else:
get_tree().quit()
OS.create_process(executable_path, args)
if OS.get_name() == "Windows":
# 使用线程来延迟退出
var thread = Thread.new()
thread.start(_delayed_quit)
else:
get_tree().quit()
elif config.compatibility_mode == 3:
print("[Compatibility] Running on 'non-opengl3' rendering driver.")
func _delayed_quit() -> void:
OS.delay_msec(500) # 等待 500 毫秒
OS.delay_msec(100) # 等待 100 毫秒
OS.kill(OS.get_process_id())
get_tree().quit()