aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorValerio Proietti2019-06-30 12:52:04 +0200
committerValerio Proietti2019-06-30 12:52:04 +0200
commit4ce3bd436026de48ec0d984c602325e707081255 (patch)
tree12099ca64dfeb5ac6a372992e7098f32f21b2acf /frontend
parentd3c41e5eabb5e49e457ae0413982c4c25350c170 (diff)
downloadpcsx_rearmed-4ce3bd436026de48ec0d984c602325e707081255.tar.gz
pcsx_rearmed-4ce3bd436026de48ec0d984c602325e707081255.tar.bz2
pcsx_rearmed-4ce3bd436026de48ec0d984c602325e707081255.zip
add check to avoid calling RETRO_ENVIRONMENT_SET_GEOMETRY unnecessarily
Diffstat (limited to 'frontend')
-rw-r--r--frontend/libretro.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c
index 92cc9e6..91f1b51 100644
--- a/frontend/libretro.c
+++ b/frontend/libretro.c
@@ -76,6 +76,9 @@ static bool display_internal_fps = false;
static unsigned frame_count = 0;
static bool libretro_supports_bitmasks = false;
+static unsigned previous_width = 0;
+static unsigned previous_height = 0;
+
static int plugins_opened;
static int is_pal_mode;
@@ -180,11 +183,17 @@ static void vout_set_mode(int w, int h, int raw_w, int raw_h, int bpp)
vout_width = w;
vout_height = h;
+ if (previous_width != vout_width || previous_height != vout_height)
+ {
+ previous_width = vout_width;
+ previous_height = vout_height;
+
SysPrintf("setting mode width: %d height %d\n", vout_width, vout_height);
struct retro_system_av_info info;
retro_get_system_av_info(&info);
environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &info.geometry);
+ }
set_vout_fb();
}