Cannot run ScummVM full screen on a single XRandR output
|Reported by:||SF/rrt||Owned by:||csnover|
FAQ 5.18 documents how to run ScummVM on a single screen (I've submitted some improvements to the answer in bug #7128).
However, this tip does not work for GNOME 3, or other systems that only have one X screen for multiple outputs (monitors).
It would be nice to have a fix for this, but I guess that is a matter for SDL? If so, I'm happy to submit a suitable bug report/feature request to SDL.
In the mean time, it would be nice to document this problem, for example, by adding to the FAQ answer:
Note that if you use GNOME 3, or another system that combines multiple outputs (monitors) into a single X screen, this fix won't work.
Of course, it would be even better to offer a workaround. Unfortunately, it's a bit tedious: the best way I can find is to switch off all but one display, then start ScummVM, then after quitting ScummVM, switch the other displays back on, and assign them their correct relative positions in the X screen.
I wrote a script to automate this process, which I append below:
Run a command on a single display output
(Working around the lack of a way to ask SDL for a single output)
© Reuben Thomas 27th April 2016
Distributed under the GNU General Public License version 3, or (at
your option) any later version. There is no warranty.
import sys import re import subprocess
Get XRandR outputs, and identify the primary
FIXME: read and set rotation too
primary_output = None other_outputs =  other_positions =  for line in subprocess.check_output(['xrandr']).splitlines(): m = re.match('^([^ ]+) connected (primary)?.*+([^+]+)+([^ ]+)', str(line, 'UTF_8')) if m: if m.group(2) != None: primary_output = m.group(1) else: other_outputs.append(m.group(1)) other_positions.append(m.group(3) + 'x' + m.group(4))
if primary_output == None: raise ValueError('No primary output found')
Construct XRandR command to switch off other monitors
off_cmd = ['xrandr'] on_cmd = ['xrandr'] for i, output in enumerate(other_outputs): off_cmd += ['--output', output, '--off'] on_cmd += ['--output', output, '--auto', '--pos', other_positions[i]]
Run given command wrapped with monitor switching commands
print (off_cmd, on_cmd)
subprocess.check_call(off_cmd) subprocess.check_call(sys.argv[1:]) subprocess.check_call(on_cmd) ~~~~
Ticket imported from: bugs/7129.