From 81254c13d9ae96f369fbb79506bcbee20a8f8659 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Thu, 2 Oct 2014 20:54:46 +0100 Subject: [PATCH 1/2] (PSP) add new resampler parameters to resampler_CC_init. --- audio/resamplers/cc_resampler.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/audio/resamplers/cc_resampler.c b/audio/resamplers/cc_resampler.c index d8d7d55dea..b0628d3e89 100644 --- a/audio/resamplers/cc_resampler.c +++ b/audio/resamplers/cc_resampler.c @@ -188,8 +188,13 @@ static void resampler_CC_free(void *re_) (void)re_; } -static void *resampler_CC_init(double bandwidth_mod) +static void *resampler_CC_init(const struct resampler_config *config, + double bandwidth_mod, resampler_simd_mask_t mask) { + (void)mask; + (void)bandwidth_mod; + (void)config; + __asm__ ( ".set push\n" ".set noreorder\n" From 6f15383b2c30e19d23cb49da67bd59dfd9ea3591 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Thu, 2 Oct 2014 21:02:27 +0100 Subject: [PATCH 2/2] initialize frame_cache and texture_frame to a dummy frame in init_video_input() to avoid undefined behavior in the init phase in case they are used before being set. --- driver.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/driver.c b/driver.c index b72b851694..c231d0d95e 100644 --- a/driver.c +++ b/driver.c @@ -1349,6 +1349,7 @@ void init_video_input(void) const input_driver_t *tmp = NULL; const struct retro_game_geometry *geom = NULL; video_info_t video = {0}; + static int dummy_pixel=0; rarch_init_filter(g_extern.system.pix_fmt); rarch_init_shader_dir(); @@ -1516,6 +1517,16 @@ void init_video_input(void) rarch_main_command(RARCH_CMD_OVERLAY_INIT); g_extern.measure_data.frame_time_samples_count = 0; + + g_extern.frame_cache.width = 1; + g_extern.frame_cache.height = 1; + g_extern.frame_cache.pitch = 4; + g_extern.frame_cache.data = &dummy_pixel; + + if (driver.video_poke && driver.video_poke->set_texture_frame) + driver.video_poke->set_texture_frame(driver.video_data, + &dummy_pixel, false, 1, 1, 1.0f); + } void uninit_video_input(void)