From 9acf3e23096e975fc125c19eb0f3a90475f01015 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 22 Jan 2016 16:50:26 +0100 Subject: [PATCH] (Imageviewer) Call RETRO_ENVIRONMENT_SET_GEOMETRY after loading image --- cores/libretro-imageviewer/image_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cores/libretro-imageviewer/image_core.c b/cores/libretro-imageviewer/image_core.c index 7607452918..3131a56520 100644 --- a/cores/libretro-imageviewer/image_core.c +++ b/cores/libretro-imageviewer/image_core.c @@ -196,6 +196,7 @@ void IMAGE_CORE_PREFIX(retro_cheat_set)(unsigned a, bool b, const char * c) static bool imageviewer_load(const char *path, uint32_t *buf, int image_index) { int comp; + struct retro_system_av_info info; uint32_t *end = NULL; image_buffer = (uint32_t*)stbi_load( path, @@ -215,6 +216,10 @@ static bool imageviewer_load(const char *path, uint32_t *buf, int image_index) buf++; } + IMAGE_CORE_PREFIX(retro_get_system_av_info)(&info); + + IMAGE_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_GEOMETRY, &info.geometry); + return true; }