Merge pull request #10312 from natinusala/vc-fix

Fix VG and VC EGL
This commit is contained in:
Autechre 2020-03-20 17:34:33 +01:00 committed by GitHub
commit 92f6c33d34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -127,6 +127,8 @@ static void *vg_init(const video_info_t *video,
const gfx_ctx_driver_t *ctx = video_context_driver_init_first(
vg, settings->arrays.video_context_driver,
GFX_CTX_OPENVG_API, 0, 0, false, &ctx_data);
bool adaptive_vsync_enabled = video_driver_test_all_flags(
GFX_CTX_FLAGS_ADAPTIVE_VSYNC) && video->adaptive_vsync;
if (!vg || !ctx)
goto error;
@ -153,8 +155,6 @@ static void *vg_init(const video_info_t *video,
if (ctx->swap_interval)
{
bool adaptive_vsync_enabled = video_driver_test_all_flags(
GFX_CTX_FLAGS_ADAPTIVE_VSYNC) && video->adaptive_vsync;
if (adaptive_vsync_enabled && interval == 1)
interval = -1;
ctx->swap_interval(vg->ctx_data, interval);
@ -221,10 +221,10 @@ static void *vg_init(const video_info_t *video,
vg->mTexType,
vg->mTextureWidth,
vg->mTextureHeight,
video->smooth
? VG_IMAGE_QUALITY_BETTER
video->smooth
? VG_IMAGE_QUALITY_BETTER
: VG_IMAGE_QUALITY_NONANTIALIASED);
vg_set_nonblock_state(vg, !video->vsync);
vg_set_nonblock_state(vg, !video->vsync, adaptive_vsync_enabled, interval);
inp.input = input;
inp.input_data = input_data;

View File

@ -180,7 +180,6 @@ static void *gfx_ctx_vc_init(void *video_driver)
EGL_NONE
};
#endif
settings_t *settings = config_get_ptr();
vc_ctx_data_t *vc = NULL;
unsigned fullscreen_x = settings->uints.video_fullscreen_x;
unsigned fullscreen_y = settings->uints.video_fullscreen_y;