libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.4k stars 1.84k forks source link

[Bug] CRTSwitchRes: After exiting RetroArch, the resolution is set to 700×480 59.94Hz #10854

Open joerg-knitter opened 4 years ago

joerg-knitter commented 4 years ago

Description

When exiting RetroArch in an Linux environment (e.g. Batocera distribution on X64) with CRTSwitchRes enabled, the resolution is set to 700x480px @59.94Hz. Especially when using another frontend like EmulationStation with a different resolution, maybe even with non-RetroArch emulators, this is annoying.

Expected behavior

When exiting RetroArch with CRTSwitchRes enabled, the resolution should be set to the resolution/refresh rate that was set before starting RetroArch.

Actual behavior

When exiting RetroArch with CRTSwitchRes enabled, the resolution is set to 700x480px @59.94Hz.

Steps to reproduce the bug

  1. Use a frontend like EmulationStation (e.g. by using RetroPie, Batocera etc.). Configure it so that it uses a resolution like 640x480@69.94Hz interlaced or 768x576@50Hz interlace (standard CRT TV resolution). Check if it is really enabled with xrandr.
  2. Start RetroArch with any game/core that does not use the standard resolution (e.g. NES, SNES, PSX).
  3. In the video settings, enable CRTSwitchRes (in my case "native", 15kHz)
  4. Exit RetroArch.
  5. Use xrandr to check the current resolution.

Bisect Results

The appropriate lines in the source code might be in gfx\display_servers\dispserv_x11.c, starting with line 104: #ifdef HAVE_XRANDR if (crt_en) { snprintf(xrandr, sizeof(xrandr), "xrandr --newmode 700x480_59.94 13.849698 700 742 801 867 480 490 496 533 interlace -hsync -vsync"); system(xrandr); ...

Version/Commit

Environment information

LibretroAdmin commented 2 years ago

Can this be closed @alphanu1 ?

alphanu1 commented 2 years ago

Yep this can be closed off. @LibretroAdmin

cyberluke commented 2 years ago

Why closed? I just came here after finding you have RetroArch tech debt:

My discovery: https://forums.libretro.com/t/force-custom-native-resolution-in-retroarch/39030/11

Other people issues (confirmed) and it mentions this Github Issue as well: https://forum.batocera.org/d/5865-scaling-all-games-properly-with-retroarch-on-a-crt-tv-screen/2

On top of that, Sony PVM is the gold standard and almost everyone, who does emulation with CRT gaming has one. It is the most common monitor for 15kHz. It should be finally supported and tested.