Commit 73e19de5 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko

retro-runner: Use savestate aspect ratio for pixbufs

Use Retro.pixbuf_set_aspect_ratio() before sending the pxibuf to retro-gtk.
This ensures that the pixbuf is displayed with correct aspect ratio.

If no aspect ratio is present, do nothing, falling back to the previous
behavior.
parent fdd0b65d
......@@ -182,6 +182,11 @@ public class Games.RetroRunner : Object, Runner {
// a critical operation
try {
pixbuf = new Gdk.Pixbuf.from_file (screenshot_path);
var aspect_ratio = savestate.get_screenshot_aspect_ratio ();
if (aspect_ratio != 0)
Retro.pixbuf_set_aspect_ratio (pixbuf, (float) aspect_ratio);
}
catch (Error e) {
warning ("Couldn't load %s: %s", screenshot_path, e.message);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment