Skip to content

Commit

Permalink
Fix DPI for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz committed Feb 17, 2024
1 parent 1dbe150 commit 27e77d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ It is based on [mymc+](https://git.sr.ht/~thestr4ng3r/mymcplus) by Florian Märk

Changes that have been made from the original code include the following:

* Ported to Python 3 and wxPython Phoenix
* Replaced the natively implemented 3D icon renderer with a cross-platform solution using OpenGL 3.2 Core
* Added support for importing PSV files (as created by the PlayStation 3)
* Added a py.test based test suite
* Many other small refactorings...
* Added support for MemCard PRO2 .mc2 files
* Usability improvements
* Various bug fixes

Please note that mymc++ is released under the **GPLv3, not Public Domain**!

Expand Down Expand Up @@ -85,7 +83,7 @@ It is always necessary to specify the path to a memory card image
with `-i <path>` first. For example:

```
mymcplus -i empty.ps2 format
mymcplusplus -i empty.ps2 format
```

creates the file `empty.ps2` and formats it as an empty memory card.
11 changes: 7 additions & 4 deletions mymcplusplus/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
sys.setdefaultencoding("mbcs")
import wx

import ctypes
try: ctypes.windll.shcore.SetProcessDpiAwareness(True)
except: pass

from .. import ps2mc, ps2iconsys
from ..round import *
from ..save import ps2save
Expand Down Expand Up @@ -120,8 +124,8 @@ def __init__(self, parent, title, mcname = None):
self.mcname = None
self.icon_win = None

size = (800, 400)
wx.Frame.__init__(self, parent, wx.ID_ANY, title, size = size)
wx.Frame.__init__(self, parent, wx.ID_ANY, title)
self.SetClientSize(self.FromDIP((800, 400)))

self.Bind(wx.EVT_CLOSE, self.evt_close)

Expand Down Expand Up @@ -157,8 +161,7 @@ def __init__(self, parent, title, mcname = None):

self.CreateToolBar(wx.TB_HORIZONTAL)
self.toolbar = toolbar = self.GetToolBar()
tbsize = (32, 32)
toolbar.SetToolBitmapSize(tbsize)
toolbar.SetToolBitmapSize(self.FromDIP(wx.Size(50, 50)))
add_tool(toolbar, self.ID_CMD_OPEN, "Open", wx.ART_FILE_OPEN, "open.png")
toolbar.AddSeparator()
add_tool(toolbar, self.ID_CMD_IMPORT, "Import", None, "import.png")
Expand Down

0 comments on commit 27e77d4

Please sign in to comment.