Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Dec 1, 2024
1 parent e05c29e commit 80c691a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions py/LunaTranslator/myutils/hwnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,9 @@ def grabwindow(app="PNG", callback_origin=None, tocliponly=False):
os.makedirs(dirname, exist_ok=True)
fname = os.path.join(dirname, tmsp)
except:
fnamebase = "cache/screenshot"
if not os.path.exists(fnamebase):
fnamebase = windows.SHGetFolderPathW(windows.CSIDL_MYPICTURES)
if not (fnamebase and os.path.exists(fnamebase)):
fnamebase = "cache/screenshot"
else:
fnamebase = os.path.join(fnamebase, "LunaTranslator")
fname = os.path.join(fnamebase, exename, tmsp)
os.makedirs(os.path.join(fnamebase, exename), exist_ok=True)
fname = gobject.getcachedir(
"screenshot/{}/{}".format(exename, tmsp), abspath=False
)

def callback_1(callback_origin, uid, tocliponly, p: QPixmap, fn):
if p.isNull():
Expand Down

0 comments on commit 80c691a

Please sign in to comment.