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")
@morof-r
Copy link

morof-r commented Jan 18, 2022

Hi everyone,

I just updated my mac to Monterey, and since then nothing seems to affect the screen size of Arena.
I entered those lines into a file:

defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
export WIDTH=system_profiler SPDisplaysDataType |grep Resolution | egrep -o [0-9]+ |sed -n '1p'
export HEIGHT=system_profiler SPDisplaysDataType |grep Resolution | egrep -o [0-9]+ |sed -n '2p'
defaults write com.wizards.mtga "Screenmanager Resolution Width" -integer $WIDTH
defaults write com.wizards.mtga "Screenmanager Resolution Height" -integer $HEIGHT

And ran it with sh, but nothing happens. Am I doing something wrong? Do I have to put the script file in a specific location?

Thanks for your help!

@ElMarino77
Copy link

For me only this helped:

Running the following in EPIC games additional command line works for me on my 14" MacBook:

" /Users/Shared/Epic Games/MagicTheGathering/MTGA.app/Contents/MacOS/MTGA" -screen-width 3024 -screen-height 1701 -screen-fullscreen 1 "

@morof-r
Copy link

morof-r commented Jan 18, 2022

Thanks! But I cannot manage to run it. How do I do, I just enter this into my terminal? If I do that I get a ">" symbol and nothing happens.

@ElMarino77
Copy link

You have to enter this line in EPIC.
Settings-> Manage Games - > Game Settings for MTGA -> Additional Command Line Arguments -> Than enter the command.
This worked for me.

@timfuqua
Copy link

On my MacBook Air (M1, 2020), using 2560x1600 (a 16:10 aspect ratio) caused left and right sides to get cut off. I changed it to 2560x1440 (a 16:9 aspect ratio) and now it runs great. As others have also said, I prefer to start in windowed and then change to fullscreen when I want, so I use -screen-fullscreen 0.

@april
Copy link
Author

april commented Feb 11, 2022

FWIW, I use -force-metal -screen-fullscreen 1 -screen-width 3456 -screen-height 1944 on my 16" MBP and that seems to work okay.

@jbmorgan
Copy link

That worked for me, thank you so much!

@obot64
Copy link

obot64 commented Feb 18, 2022

How do I get my resolution options back to normal?

Since the crimson vow update I have only been able to run MTGA at 1440 x 900 resolution. :(

I have a MacBook Pro (Retina, 13-inch, Early 2015) running OS 10.15.5

Prior to Crimson Vow, I had several options for resolutions that would work full screen and windowed.

I have read through the thread and your comments have bee helpful, I even learned how to input command into the Epic settings for MTGA.

Can someone please help me have more resolution options :-)

@blundin
Copy link

blundin commented Feb 23, 2022

@iliaslonski those command line arguments worked perfectly. Thank you!

@XvKirxitoVX
Copy link

Hey Guys, i have the newst Macbook Air with the M1 Chip from Apple, i want to play MTG without problems. what is the latest option for this? THX!

@max1c
Copy link

max1c commented Mar 13, 2022

Hey Guys, i have the newst Macbook Air with the M1 Chip from Apple, i want to play MTG without problems. what is the latest option for this? THX!

Use this: -screen-fullscreen 1 -force-metal -force-low-power-device -screen-height 1440 -screen-width 2560

@XvKirxitoVX
Copy link

Hey Guys, i have the newst Macbook Air with the M1 Chip from Apple, i want to play MTG without problems. what is the latest option for this? THX!

Use this: -screen-fullscreen 1 -force-metal -force-low-power-device -screen-height 1440 -screen-width 2560

Where did u type this in?

@april
Copy link
Author

april commented Mar 13, 2022

It's in the Epic global settings, scroll down to MTGA, extra command line options.

@EvilJordan
Copy link

Bless you.

@vvavelord
Copy link

Hi guys. I tried a lot of times and can't understand what's wrong. I tried this code:

defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
defaults write com.wizards.mtga "Screenmanager Resolution Width" -integer 2560
defaults write com.wizards.mtga "Screenmanager Resolution Height" -integer 1600
defaults write com.wizards.mtga "HashFilesSkippedOnce" -integer 0

and got this error:
/Users/macbook/Desktop/gf.sh: line 1: {rtf1ansiansicpg1250cocoartf2580: command not found
/Users/macbook/Desktop/gf.sh: line 2: syntax error near unexpected token }' /Users/macbook/Desktop/gf.sh: line 2: \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 .AppleSystemUIFontMonospaced-Regular;}'

can you help me?

@patrickstjohn
Copy link

image

@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