Skip to content

Instantly share code, notes, and snippets.

@april
Last active November 13, 2024 22:39
Show Gist options
  • Save april/ef679cf5719cc5a2ba6a55da20869ffa to your computer and use it in GitHub Desktop.
Save april/ef679cf5719cc5a2ba6a55da20869ffa to your computer and use it in GitHub Desktop.
Fixes Magic Arena's broken full screen implementation on macOS
# this forces Arena into full screen mode on startup, set back to 3 to reset
# note that if you go into the Arena "Graphics" preference panel, it will reset all of these
# and you will need to run these commands again
defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
defaults write com.wizards.mtga "Screenmanager Resolution Use Native" -integer 0
# you can also replace the long complicated integer bit with any other scaled 16:9
# resolution your system supports.
# to find the scaled resolutions, go to System Preferences --> Display and then
# divide the width by 16 and multiple by 9. on my personal system this ends up
# as 3456 x 1944 (versus the bizarre 1728x1117 it will very temporarily select
# when clicking the full screen option in the client
defaults write com.wizards.mtga "Screenmanager Resolution Width" -integer \
$(system_profiler SPDisplaysDataType | grep Resolution | cut -c23-26)
defaults write com.wizards.mtga "Screenmanager Resolution Height" -integer \
$(bc <<< "$(system_profiler SPDisplaysDataType | grep Resolution | cut -c23-26) / 16 * 9")
@vmga00
Copy link

vmga00 commented Jun 2, 2022

Hi, I tried
defaults read com.wizards.mtga
then run the script (with and without elevation) then checking the defaults again and I see the same values, is something additional needed?

running the game through the epic store with the modified values also seem to have no effect, do i need to do a csrutil disable for the changes to apply?

@strlns
Copy link

strlns commented Jun 6, 2022

These command-line options worked well on my partner's Macbook Air 2018:

-screen-width 1920 -screen-height 1080 -force-metal 1 -screen-fullscreen 1

@dozyc
Copy link

dozyc commented Nov 3, 2022

@april 🙇 thank you!
I have a 15-inch mid-2014 Macbook 🥺 and everything looks good if I use 2880x1620. Once I enter the graphics settings though it reverts to 1920x1200 (??) and stuff gets cut off on the sides. I just exit and re-apply these settings if I accidentally do that though.

defaults write com.wizards.mtga "Screenmanager Resolution Width" -integer 2880
defaults write com.wizards.mtga "Screenmanager Resolution Height" -integer 1620

@Rkoz-01
Copy link

Rkoz-01 commented Nov 18, 2022

I'm trying to get my 2021 MacBook M1 13" laptop to work. I tried " -screen-fullscreen 0 -screen-height 1440 -screen-width 2560 " and also with full screen to 1, and I've included the force metal and low power options as well. With full screen set to 0, the windowed game does have a good, correct resolution and the text is readable, and I get many options for resolutions in the Graphics settings of MTGA. But if I then click 'full screen' in-game, it goes right back to 1440x900 and it being the only option. Then when I uncheck fullscreen, it goes back to full-resolution windowed. I don't want to play windowed, so I'm at a loss. Any further ideas? I have not tried the original .sh version, as I don't understand it and figure its for older Macs? I'm new to Macs overall...

@dozyc
Copy link

dozyc commented Nov 19, 2022

Hey @Rkoz-01 what is the native resolution of your screen? You can find that with System Preferences --> Display. Use the width as-is then the height use the formula width/16*9. Use screen-fullscreen=1 for sure if you want full screen, going through the settings menu kills the custom settings.

@Rkoz-01
Copy link

Rkoz-01 commented Nov 19, 2022

native per google is 2560x1600 (I don't see the resolution in system preferences, just "Default for Display"). I have tried both screen-fullscreen = 0 and 1, and in both cases, the game's fullscreen checkbox has the correct resolution when not full screen, but the bad resolution when full screen. I have tried both 1600 and 1440 for the height. These are just the command line options in Epic, am I supposed to do something with the .sh file first?

Also, I can't be sure (can I?), but it seems like the game's loading screen is sharp and may be full-res, before it fully launches to the main menu and is low-res.

@aborchew
Copy link

This is amazing - thank you so very much!

@LarterStyles
Copy link

LarterStyles commented Sep 14, 2024

FYI, it appears WOTC has finally implemented a fix for this in the v2024.40.30 update (released on 12 Sep 2024). When you open the graphics options in the MTGA macOS app now, your maximum supported resolution will be displayed / supported in fullscreen mode.

Note however that the resolutions are calculated slightly differently to this script. In the case of my MacBook Pro M1, which has a built-in display that supports 3456 x 2234:

  • This script sets my resolution to 3456 x 1944, which is a 16:9 aspect ratio, and therefore means the image fills the screen horizontally, but has a bit of black letterboxing at the top and bottom;
  • Whereas the MTGA app now natively displays my maximum resolution, which is a 16:10 aspect ratio, and therefore means the image fills the screen horizontally and vertically, however this does cause some slight cropping of the in-game UI (i.e. things on the very left/right edges of the image appear partly off-screen, such as the companions and stack).

If you change the last line of this script from 16 * 9 to 16 * 10, then the native behaviour is identical (although I personally prefer the former).

@LarterStyles
Copy link

Alas, this bug has been reintroduced in the Duskmourn Alchemy (v2024.42.0) update.

Furthermore, regardless of what height and width values I specify in the script now, my MTGA resolution is always displayed in 16:10 ratio. Using the Epic Games Launcher is a valid workaround though, as that correctly renders the app in 16:9 in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment