Skip to content

Commit

Permalink
feat: enable DPI awareness on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
thegamecracks committed Mar 20, 2024
1 parent c4e40d6 commit 7de5e82
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/dumdum/client/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import argparse
import contextlib
import platform
from typing import Iterator

from dumdum.logging import configure_logging
Expand Down Expand Up @@ -41,6 +42,7 @@ def main():
mode: str = args.mode

configure_logging(verbose)
enable_windows_dpi_awareness()

if mode == "gui":
run_gui()
Expand All @@ -60,6 +62,13 @@ def run_gui() -> None:
app.mainloop()


def enable_windows_dpi_awareness():
if platform.system() == "Windows":
from ctypes import windll

windll.shcore.SetProcessDpiAwareness(2)


def show_appdirs() -> None:
from dumdum.appdirs import APP_DIRS

Expand Down

0 comments on commit 7de5e82

Please sign in to comment.