Skip to content

Commit

Permalink
修复不支持vulkan机器报错
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Apr 6, 2021
1 parent 06b2f20 commit 1fea542
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions start.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# -*- coding: utf-8 -*-
"""第一个程序"""
from PySide2 import QtWidgets # 导入PySide2部件
import sys

from conf import config
sys.path.append("lib")
import waifu2x
try:
import waifu2x
config.CanWaifu2x = True
except Exception as es:
config.CanWaifu2x = False

from PySide2 import QtWidgets # 导入PySide2部件
from src.qt.qtmain import BikaQtMainWindow
from src.util import Log

Expand All @@ -16,5 +22,7 @@

main.show() # 显示窗体
main.Init()
sys.exit(app.exec_()) # 运行程序
waifu2x.Stop()
sts = app.exec_()
if config.CanWaifu2x:
waifu2x.Stop()
sys.exit(sts) # 运行程序

0 comments on commit 1fea542

Please sign in to comment.