40 lines
744 B
Python
40 lines
744 B
Python
import sys
|
|
|
|
import wx
|
|
|
|
from mind_reader.ui.main_frame import MainFrame
|
|
|
|
|
|
def enable_high_dpi_support():
|
|
if sys.platform == "win32":
|
|
try:
|
|
import ctypes
|
|
|
|
ctypes.windll.shcore.SetProcessDpiAwareness(2)
|
|
except Exception:
|
|
try:
|
|
import ctypes
|
|
|
|
ctypes.windll.user32.SetProcessDPIAware()
|
|
except Exception:
|
|
pass
|
|
|
|
|
|
class MindReaderApp(wx.App):
|
|
def OnInit(self) -> bool:
|
|
self.frame = MainFrame()
|
|
self.frame.Show(True)
|
|
self.SetTopWindow(self.frame)
|
|
return True
|
|
|
|
|
|
def main():
|
|
enable_high_dpi_support()
|
|
|
|
app = MindReaderApp(redirect=False)
|
|
app.MainLoop()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|