mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 12:40:07 +00:00
ios: Add a hack to skip frames when video non-block is used, this allows the fast forward function to be used.
This commit is contained in:
parent
b4814a96f2
commit
de05d7d7fb
@ -29,7 +29,8 @@
|
||||
// C interface
|
||||
static void gfx_ctx_set_swap_interval(unsigned interval)
|
||||
{
|
||||
RARCH_LOG("gfx_ctx_set_swap_interval not supported.\n");
|
||||
extern void ios_set_game_view_sync(bool on);
|
||||
ios_set_game_view_sync(interval ? true : false);
|
||||
}
|
||||
|
||||
static void gfx_ctx_destroy(void)
|
||||
|
@ -21,6 +21,8 @@ static GLKView *gl_view;
|
||||
static float screen_scale;
|
||||
static bool ra_initialized = false;
|
||||
static bool ra_done = false;
|
||||
static int frame_skips = 4;
|
||||
static bool is_syncing = true;
|
||||
|
||||
void ios_load_game(const char* file_name)
|
||||
{
|
||||
@ -112,11 +114,21 @@ void ios_flip_game_view()
|
||||
{
|
||||
if (gl_view)
|
||||
{
|
||||
[gl_view setNeedsDisplay];
|
||||
[gl_view bindDrawable];
|
||||
if (--frame_skips < 0)
|
||||
{
|
||||
[gl_view setNeedsDisplay];
|
||||
[gl_view bindDrawable];
|
||||
frame_skips = is_syncing ? 0 : 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ios_set_game_view_sync(bool on)
|
||||
{
|
||||
is_syncing = on;
|
||||
frame_skips = on ? 0 : 3;
|
||||
}
|
||||
|
||||
void ios_get_game_view_size(unsigned *width, unsigned *height)
|
||||
{
|
||||
if (gl_view)
|
||||
|
Loading…
x
Reference in New Issue
Block a user