Skip to content

Commit

Permalink
feat: hard-update container scaling (resolves? #61)
Browse files Browse the repository at this point in the history
  • Loading branch information
vapidinfinity committed Nov 10, 2024
1 parent c46773d commit ba4b623
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mythic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3055;
CURRENT_PROJECT_VERSION = 3067;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
Expand Down Expand Up @@ -820,7 +820,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3055;
CURRENT_PROJECT_VERSION = 3067;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
Expand Down
11 changes: 11 additions & 0 deletions Mythic/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ class AppDelegate: NSObject, NSApplicationDelegate { // https://arc.net/l/quote/

Wine.containerURLs = Wine.containerURLs.filter { files.fileExists(atPath: $0.path(percentEncoded: false)) }

// MARK: Update container scaling

for container in Wine.containerObjects where container.settings.scaling == 0 {
let defaultScale = Wine.defaultContainerSettings.scaling

Task(priority: .background) {
await Wine.setDisplayScaling(containerURL: container.url, dpi: defaultScale)
container.settings.scaling = defaultScale
}
}

// MARK: <0.3.2 Config folder rename (Config → Epic)

let legendaryOldConfig: URL = Bundle.appHome!.appending(path: "Config")
Expand Down

0 comments on commit ba4b623

Please sign in to comment.