diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index 24395a5769..691213f7b6 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -282,7 +282,7 @@ static EGLDisplay get_egl_display(EGLenum platform, void *native) return dpy; } } -#endif // defined(EGL_VERSION_1_5) +#endif /* defined(EGL_VERSION_1_5) */ #if defined(EGL_EXT_platform_base) if (check_egl_client_extension("EGL_EXT_platform_base")) @@ -299,7 +299,7 @@ static EGLDisplay get_egl_display(EGLenum platform, void *native) return dpy; } } -#endif // defined(EGL_EXT_platform_base) +#endif /* defined(EGL_EXT_platform_base) */ } /* Either the caller didn't provide a platform type, or the EGL diff --git a/libretro-common/gfx/scaler/scaler_filter.c b/libretro-common/gfx/scaler/scaler_filter.c index 56d14304bc..262a482553 100644 --- a/libretro-common/gfx/scaler/scaler_filter.c +++ b/libretro-common/gfx/scaler/scaler_filter.c @@ -118,8 +118,11 @@ static void fixup_filter_sub(struct scaler_filter *filter, if (postsample > 0) { + int16_t *base_filter = NULL; + filter->filter_pos[i] -= postsample; - int16_t *base_filter = filter->filter + i * filter->filter_stride; + + base_filter = filter->filter + i * filter->filter_stride; if (postsample > (int)filter->filter_len) memset(base_filter, 0, filter->filter_len * sizeof(int16_t)); @@ -133,8 +136,10 @@ static void fixup_filter_sub(struct scaler_filter *filter, if (presample > 0) { + int16_t *base_filter = NULL; + filter->filter_pos[i] += presample; - int16_t *base_filter = filter->filter + i * filter->filter_stride; + base_filter = filter->filter + i * filter->filter_stride; if (presample > (int)filter->filter_len) memset(base_filter, 0, filter->filter_len * sizeof(int16_t));