Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdb84b94

Browse files
committed
egl: Default to a swap interval of 0.
This matches other platforms.Also make sure Android explicitly sets vsync on restore, regardless of thespecific setting, to make sure it's consistent.Fixes#14642.
1 parentdeb85d1 commitdb84b94

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

‎src/video/SDL_egl.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,8 @@ SDL_GLContext SDL_EGL_CreateContext(SDL_VideoDevice *_this, EGLSurface egl_surfa
11441144
}
11451145
}
11461146

1147+
SDL_GL_SetSwapInterval(0);// EGL tends to default to vsync=1. To make this consistent with the rest of SDL, we force it off at startup. Apps can explicitly enable it afterwards.
1148+
11471149
return (SDL_GLContext)egl_context;
11481150
}
11491151

‎src/video/android/SDL_androidevents.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ static void android_egl_context_restore(SDL_Window *window)
5050
}
5151
data->backup_done= false;
5252

53-
if (data->has_swap_interval) {
54-
SDL_GL_SetSwapInterval(data->swap_interval);
55-
}
56-
53+
SDL_GL_SetSwapInterval(data->swap_interval);
5754
}
5855
}
5956

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp