https://bitbucket.org/hudson/magic-lantern
Revision f4fb08288ce243d818bb7cbec0cc866efa5797a8 authored by alex@thinkpad on 29 October 2017, 19:04:27 UTC, committed by alex@thinkpad on 29 October 2017, 19:04:27 UTC
(they are interchangeable; older systems may require gvfs-mount, newer systems will print warnings)
1 parent 94ac658
Raw File
Tip revision: f4fb08288ce243d818bb7cbec0cc866efa5797a8 authored by alex@thinkpad on 29 October 2017, 19:04:27 UTC
Makefile: use "gio mount" rather than "gvfs-mount"
Tip revision: f4fb082
vsync-lite.c
/** 
 * Vsync for LiveView - to be called from state-object.c
 * 
 **/

#include "dryos.h"

static struct msg_queue * vsync_msg_queue = 0;


void lv_vsync_signal()
{
    msg_queue_post(vsync_msg_queue, 1);
}

void lv_vsync(int mz)
{
    #if defined(CONFIG_DIGIC_V) || defined(CONFIG_60D)
    int msg;
    msg_queue_receive(vsync_msg_queue, (struct event**)&msg, 100);
    #else
    static int k = 0; k++;
    msleep(mz ? (k % 50 == 0 ? MIN_MSLEEP : 10) : MIN_MSLEEP);
    #endif
}

static void vsync_init()
{
    vsync_msg_queue = (void*)msg_queue_create("vsync_mq", 1);
}

INIT_FUNC("vsync", vsync_init);
back to top