• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ resources_register_int函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中resources_register_int函数的典型用法代码示例。如果您正苦于以下问题:C++ resources_register_int函数的具体用法?C++ resources_register_int怎么用?C++ resources_register_int使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了resources_register_int函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: joy_arch_resources_init

int joy_arch_resources_init(void)
{
    if (joyport_get_port_name(JOYPORT_1)) {
        if (resources_register_int(joy1_resources_int) < 0) {
            return -1;
        }
    }
    if (joyport_get_port_name(JOYPORT_2)) {
        if (resources_register_int(joy2_resources_int) < 0) {
            return -1;
        }
    }
    if (joyport_get_port_name(JOYPORT_3)) {
        if (resources_register_int(joy3_resources_int) < 0) {
            return -1;
        }
    }
    if (joyport_get_port_name(JOYPORT_4)) {
        if (resources_register_int(joy4_resources_int) < 0) {
            return -1;
        }
    }

    return 0;
}
开发者ID:carriercomm,项目名称:VICE-Core,代码行数:25,代码来源:joyll.c


示例2: output_text_init_resources

int output_text_init_resources(void)
{
    output_select_t output_select;

    output_select.output_name = "text";
    output_select.output_open = output_text_open;
    output_select.output_close = output_text_close;
    output_select.output_putc = output_text_putc;
    output_select.output_getc = output_text_getc;
    output_select.output_flush = output_text_flush;

    output_select_register(&output_select);

    if (resources_register_string(resources_string) < 0) {
        return -1;
    }

    if (machine_class != VICE_MACHINE_C64DTV
        && machine_class != VICE_MACHINE_PLUS4) {
        if (resources_register_int(resources_int_userport) < 0) {
            return -1;
        }
    }

    return resources_register_int(resources_int);
}
开发者ID:Rakashazi,项目名称:emu-ex-plus-alpha,代码行数:26,代码来源:output-text.c


示例3: drive_resources_init

int drive_resources_init(void)
{
    unsigned int dnr;
    drive_t *drive;

    for (dnr = 0; dnr < DRIVE_NUM; dnr++) {
        drive = drive_context[dnr]->drive;

        res_drive[0].name = lib_msprintf("Drive%iExtendImagePolicy", dnr + 8);
        res_drive[0].value_ptr = (int *)&(drive->extend_image_policy);
        res_drive[0].param = uint_to_void_ptr(dnr);
        res_drive[1].name = lib_msprintf("Drive%iIdleMethod", dnr + 8);
        res_drive[1].value_ptr = &(drive->idling_method);
        res_drive[1].param = uint_to_void_ptr(dnr);

        if (resources_register_int(res_drive) < 0) {
            return -1;
        }

        lib_free((char *)(res_drive[0].name));
        lib_free((char *)(res_drive[1].name));
    }

    return machine_drive_resources_init()
           | resources_register_int(resources_int);
}
开发者ID:AreaScout,项目名称:vice,代码行数:26,代码来源:drive-resources.c


示例4: sfx_soundexpander_resources_init

int sfx_soundexpander_resources_init(void)
{
    if (machine_class == VICE_MACHINE_VIC20) {
        if (resources_register_int(resources_mascuerade_int) < 0) {
            return -1;
        }
    }
    return resources_register_int(resources_int);
}
开发者ID:BigBoss21X,项目名称:vice-emu,代码行数:9,代码来源:sfx_soundexpander.c


示例5: joystick_init_resources

int joystick_init_resources(void)
{
    resources_register_int(resources_int);

    if (machine_class != VICE_MACHINE_PLUS4) {
        resources_register_int(extra_resources_int);
    }

    return joystick_arch_init_resources();
}
开发者ID:twinaphex,项目名称:vice-next,代码行数:10,代码来源:joystick.c


示例6: drive_resources_init

int drive_resources_init(void)
{
    unsigned int dnr;
    drive_t *drive;
    int has_iec;

    switch (machine_class) {
        case VICE_MACHINE_NONE:
        case VICE_MACHINE_PET:
        case VICE_MACHINE_CBM5x0:
        case VICE_MACHINE_CBM6x0:
        case VICE_MACHINE_VSID:
            has_iec = 0;
            break;
        default:
            has_iec = 1;
    }

    for (dnr = 0; dnr < DRIVE_NUM; dnr++) {
        drive = drive_context[dnr]->drive;

        res_drive[0].name = lib_msprintf("Drive%iExtendImagePolicy", dnr + 8);
        res_drive[0].value_ptr = (int *)&(drive->extend_image_policy);
        res_drive[0].param = uint_to_void_ptr(dnr);
        res_drive[1].name = lib_msprintf("Drive%iIdleMethod", dnr + 8);
        res_drive[1].value_ptr = &(drive->idling_method);
        res_drive[1].param = uint_to_void_ptr(dnr);

        if (has_iec) {
            res_drive_rtc[0].name = lib_msprintf("Drive%iRTCSave", dnr + 8);
            res_drive_rtc[0].value_ptr = &(drive->rtc_save);
            res_drive_rtc[0].param = uint_to_void_ptr(dnr);
            if (resources_register_int(res_drive_rtc) < 0) {
                return -1;
            }
        }

        if (resources_register_int(res_drive) < 0) {
            return -1;
        }

        lib_free((char *)(res_drive[0].name));
        lib_free((char *)(res_drive[1].name));
        if (has_iec) {
            lib_free((char *)(res_drive_rtc[0].name));
        }
    }

    return machine_drive_resources_init()
           | resources_register_int(resources_int);
}
开发者ID:Yifei0727,项目名称:emu-ex-plus-alpha,代码行数:51,代码来源:drive-resources.c


示例7: sid_resources_init

int sid_resources_init(void)
{
#if defined(HAVE_RESID) || defined(HAVE_RESID_DTV)
    if (resources_register_int(resid_resources_int) < 0) {
        return -1;
    }
#endif

    if (resources_register_int(stereo_resources_int) < 0) {
        return -1;
    }

    return sid_common_resources_init();
}
开发者ID:EdCornejo,项目名称:emu-ex-plus-alpha,代码行数:14,代码来源:sid-resources.c


示例8: tfe_resources_init

int tfe_resources_init(void)
{
    if (resources_register_string(resources_string) < 0) {
        return -1;
    }

    if (machine_class == VICE_MACHINE_VIC20) {
        if (resources_register_int(resources_mascuerade_int) < 0) {
            return -1;
        }
    }

    return resources_register_int(resources_int);
}
开发者ID:Yifei0727,项目名称:emu-ex-plus-alpha,代码行数:14,代码来源:tfe.c


示例9: cbm2_resources_init

int cbm2_resources_init(void)
{
    if (resources_register_string(resources_string) < 0) {
        return -1;
    }

    if (resources_register_int(resources_int) < 0) {
        return -1;
    }

    if (resources_register_string(cbm5x0_resources_string) < 0) {
        return -1;
    }
    return resources_register_int(cbm5x0_resources_int);
}
开发者ID:OpenEmu,项目名称:VICE-Core,代码行数:15,代码来源:cbm5x0-resources.c


示例10: drive_resources_type_init

int drive_resources_type_init(unsigned int default_type)
{
    unsigned int dnr, type;
    drive_t *drive;

    for (dnr = 0; dnr < DRIVE_NUM; dnr++) {
        drive = drive_context[dnr]->drive;
        if (dnr == 0) {
            type = default_type;
        } else {
            type = DRIVE_TYPE_NONE;
        }

        res_drive_type[0].name = lib_msprintf("Drive%iType", dnr + 8);
        res_drive_type[0].factory_value = (int)type;
        res_drive_type[0].value_ptr = (int *)&(drive->type);
        res_drive_type[0].param = uint_to_void_ptr(dnr);

        if (resources_register_int(res_drive_type) < 0) {
            return -1;
        }

        lib_free((char *)(res_drive_type[0].name));
    }

    return 0;
}
开发者ID:AreaScout,项目名称:vice,代码行数:27,代码来源:drive-resources.c


示例11: raster_resources_chip_init

int raster_resources_chip_init(const char *chipname, raster_t *raster,
                               struct video_chip_cap_s *video_chip_cap)
{
    unsigned int i;
    raster_resource_chip_t *raster_resource_chip;

    raster_resource_chip = lib_calloc(1, sizeof(raster_resource_chip_t));

    raster->raster_resource_chip = raster_resource_chip;
    raster_resource_chip->raster = raster;

    for (i = 0; rname_chip[i] != NULL; i++) {
        resources_chip[i].name = util_concat(chipname, rname_chip[i], NULL);
        resources_chip[i].value_ptr
            = &(raster_resource_chip->video_cache_enabled);
        resources_chip[i].param = (void *)raster_resource_chip;
    }

    raster->canvas = video_canvas_init();

    if (resources_register_int(resources_chip) < 0) {
        return -1;
    }

    for (i = 0; rname_chip[i] != NULL; i++) {
        lib_free((char *)(resources_chip[i].name));
    }

    if (video_resources_chip_init(chipname, &raster->canvas, video_chip_cap) < 0) {
        return -1;
    }

    return 0;
}
开发者ID:Nikolaj64,项目名称:emu-ex-plus-alpha,代码行数:34,代码来源:raster-resources.c


示例12: flash_trap_resources_init

int flash_trap_resources_init(void)
{
    if (resources_register_string(resources_string) < 0)
        return -1;

    return resources_register_int(resources_int);
}
开发者ID:BigBoss21X,项目名称:vice-emu,代码行数:7,代码来源:flash-trap.c


示例13: acia_resources_init

int acia_resources_init(void)
{
    if (_acia_resources_init() < 0) {
        return -1;
    }
    return resources_register_int(resources_i);
}
开发者ID:r-type,项目名称:vice-libretro,代码行数:7,代码来源:plus4acia.c


示例14: sidcart_resources_init

int sidcart_resources_init(void)
{
    if (sid_resources_init() < 0) {
        return -1;
    }
    return resources_register_int(sidcart_resources_int);
}
开发者ID:EdCornejo,项目名称:emu-ex-plus-alpha,代码行数:7,代码来源:vic20-sidcart.c


示例15: functionrom_resources_init

int functionrom_resources_init(void)
{
    if (resources_register_string(resources_string) < 0)
        return -1;

    return resources_register_int(resources_int);
}
开发者ID:martinpiper,项目名称:VICE,代码行数:7,代码来源:functionrom.c


示例16: quicktimedrv_resources_init

static int quicktimedrv_resources_init(void)
{
    if (resources_register_string(resources_string) < 0)
        return -1;

    return resources_register_int(resources_int);
}
开发者ID:BigBoss21X,项目名称:vice-emu,代码行数:7,代码来源:quicktimedrv.c


示例17: iec128dcr_resources_init

int iec128dcr_resources_init(void)
{
    if (resources_register_string(resources_string) < 0)
        return -1;

    return resources_register_int(resources_int);
}
开发者ID:martinpiper,项目名称:VICE,代码行数:7,代码来源:iec128dcr-resources.c


示例18: c64exp_resources_init

int c64exp_resources_init(void)
{
    unsigned int dnr;
    drive_t *drive;

    for (dnr = 0; dnr < DRIVE_NUM; dnr++) {
        drive = drive_context[dnr]->drive;

        res_drive[0].name = lib_msprintf("Drive%iParallelCable", dnr + 8);
        res_drive[0].value_ptr = &(drive->parallel_cable);
        res_drive[0].param = uint_to_void_ptr(dnr);
        res_drive[1].name = lib_msprintf("Drive%iProfDOS", dnr + 8);
        res_drive[1].value_ptr = &(drive->profdos);
        res_drive[1].param = uint_to_void_ptr(dnr);
        res_drive[2].name = lib_msprintf("Drive%iSuperCard", dnr + 8);
        res_drive[2].value_ptr = &(drive->supercard);
        res_drive[2].param = uint_to_void_ptr(dnr);

        if (resources_register_int(res_drive) < 0) {
            return -1;
        }

        lib_free((char *)(res_drive[0].name));
        lib_free((char *)(res_drive[1].name));
        lib_free((char *)(res_drive[2].name));
    }

    return resources_register_string(resources_string);
}
开发者ID:AreaScout,项目名称:vice,代码行数:29,代码来源:c64exp-resources.c


示例19: expert_resources_init

int expert_resources_init(void)
{
    if (resources_register_string(resources_string) < 0) {
        return -1;
    }
    return resources_register_int(resources_int);
}
开发者ID:SMTDDR,项目名称:droidsound,代码行数:7,代码来源:expert.c


示例20: monitor_network_resources_init

/*! \brief initialize the network monitor resources
 \return
   0 on success, else -1.

 \remark
   Registers the string and the integer resources
*/
int monitor_network_resources_init(void)
{
    if (resources_register_string(resources_string) < 0)
        return -1;

    return resources_register_int(resources_int);
}
开发者ID:twinaphex,项目名称:vice-next,代码行数:14,代码来源:monitor_network.c



注:本文中的resources_register_int函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ resources_register_string函数代码示例发布时间:2022-05-30
下一篇:
C++ resources_get_int函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap