Ejemplo n.º 1
0
static void exec_quit(const char* args, context_t* ctx, debug_t* dbg)
{
    (void)args;
    (void)dbg;

    context_quit(ctx);
}
Ejemplo n.º 2
0
/**
*
*  rct2: 0x0066B83C
*/
static void window_title_exit_mouseup(rct_window *w, rct_widgetindex widgetIndex)
{
    if (gIntroState != INTRO_STATE_NONE)
        return;

    switch (widgetIndex) {
    case WIDX_EXIT:
        context_quit();
        //game_do_command(0, 1, 0, 0, 5, 3, 0);
        break;
    };
}
static gboolean test_handler(GIOChannel *channel, GIOCondition cond,
							gpointer user_data)
{
	struct context *context = user_data;
	const struct test_pdu *pdu;

	pdu = &context->data->pdu_list[context->pdu_offset++];

	g_assert(!pdu->valid);
	context_quit(context);

	context->watch_id = 0;

	return FALSE;
}
Ejemplo n.º 4
0
static gboolean send_pdu(gpointer user_data)
{
	struct context *context = user_data;
	const struct test_pdu *pdu;
	ssize_t len;

	pdu = &context->data->pdu_list[context->pdu_offset++];

	len = write(context->fd, pdu->data, pdu->size);

	util_hexdump('<', pdu->data, len, test_debug, "hog: ");

	g_assert_cmpint(len, ==, pdu->size);

	context->process = 0;

	if (!context->data->pdu_list[context->pdu_offset].valid)
		context_quit(context);

	return FALSE;
}