We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4054

Summary: [patch] Raspberry Pi refresh rate detection
Product: SDL Reporter: Viacheslav Slavinsky <svofski>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: don't know   
Hardware: ARM   
OS: Linux   
Attachments: Report correct refresh rate on Raspberry Pi

Description Viacheslav Slavinsky 2018-01-18 22:22:40 UTC
Created attachment 3147 [details]
Report correct refresh rate on Raspberry Pi

SDL_rpivideo driver has 60 frames per second hardcoded in it, this is a problem for games that need to keep pace using VSYNC. I believe that I have found a solution to this. It is based on code in tvservice.c in rpi userland:

https://github.com/raspberrypi/userland/blob/a1b89e91f393c7134b4cdc36431f863bb3333163/host_applications/linux/apps/tvservice/tvservice.c#L433

Attached is a patch that reports display refresh rate on Raspberry Pi or falls back to report 60 if it can't. I do not know when it may fail though.
Comment 1 Sam Lantinga 2018-02-07 23:05:19 UTC
Added, thanks!
https://hg.libsdl.org/SDL/rev/c7946b873fe8