Repository: lutris/lutris

Issue:
Lutris will not launch
**Describe the bug**

If I try to launch Lutris I get following output:

~$ lutris
2020-11-14 19:10:46,776: MAME XML generation launched in the background, not returning anything this time
2020-11-14 19:10:46,776: Getting full game list from MAME...
2020-11-14 19:10:46,778: MAME isn't installed, can't retrieve systems list.
Traceback (most recent call last):
  File "/usr/games/lutris", line 54, in <module>
    from lutris.gui.application import Application  # pylint: disable=no-name-in-module
  File "/usr/lib/python3/dist-packages/lutris/gui/application.py", line 52, in <module>
    from .lutriswindow import LutrisWindow
  File "/usr/lib/python3/dist-packages/lutris/gui/lutriswindow.py", line 26, in <module>
    from lutris.gui.widgets.sidebar import SidebarListBox
  File "/usr/lib/python3/dist-packages/lutris/gui/widgets/sidebar.py", line 10, in <module>
    from lutris import pga, platforms, runners
  File "/usr/lib/python3/dist-packages/lutris/platforms.py", line 19, in <module>
    _init_platforms()
  File "/usr/lib/python3/dist-packages/lutris/platforms.py", line 14, in _init_platforms
    runner = runners.import_runner(runner_name)()
  File "/usr/lib/python3/dist-packages/lutris/runners/__init__.py", line 83, in import_runner
    runner_module = get_runner_module(runner_name)
  File "/usr/lib/python3/dist-packages/lutris/runners/__init__.py", line 78, in get_runner_module
    return __import__("lutris.runners.%s" % runner_name, globals(), locals(), [runner_name], 0)
  File "/usr/lib/python3/dist-packages/lutris/runners/atari800.py", line 24, in <module>
    class atari800(Runner):
  File "/usr/lib/python3/dist-packages/lutris/runners/atari800.py", line 93, in atari800
    "choices": get_resolutions(),
  File "/usr/lib/python3/dist-packages/lutris/runners/atari800.py", line 16, in get_resolutions
    screen_resolutions = [(resolution, resolution) for resolution in display.DISPLAY_MANAGER.get_resolutions()]
  File "/usr/lib/python3/dist-packages/lutris/util/graphics/displayconfig.py", line 620, in get_resolutions
    return sorted(set(resolutions), key=lambda x: int(x.split("x")[0]), reverse=True)
  File "/usr/lib/python3/dist-packages/lutris/util/graphics/displayconfig.py", line 620, in <lambda>
    return sorted(set(resolutions), key=lambda x: int(x.split("x")[0]), reverse=True)
ValueError: invalid literal for int() with base 10: 'dbus.UInt32(1920)'


**Lutris debugging output (Optional)**

same as above


**System information (Optional)**

OS: Pop OS! 20.10
CPU: AMD Ryzen 5 2600X
GPU: NVIDIA GeForce GTX 1060 6GB
Memory: 16003MiB
Storage: 409,7 GB free


Discussion:

Resolving patch:
diff --git a/lutris/util/graphics/displayconfig.py b/lutris/util/graphics/displayconfig.py
--- a/lutris/util/graphics/displayconfig.py
+++ b/lutris/util/graphics/displayconfig.py
@@ -113,12 +113,12 @@ def winsys_id(self):
     @property
     def width(self):
         """width in physical pixels"""
-        return self.mode_info[2]
+        return int(self.mode_info[2])
 
     @property
     def height(self):
         """height in physical pixels"""
-        return self.mode_info[3]
+        return int(self.mode_info[3])
 
     @property
     def frequency(self):


Test patch: