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

C++ resources_get_int函数代码示例

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

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



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

示例1: UI_CALLBACK

static UI_CALLBACK(toggle_DelayLoopEmulation)
{
    int delayloopemulation;

    resources_get_int("PALEmulation", &delayloopemulation);

    if (!CHECK_MENUS) {
        resources_set_int("PALEmulation", !delayloopemulation);
        ui_update_menus();
    } else {
        ui_menu_set_tick(w, delayloopemulation);
    }
}
开发者ID:BigBoss21X,项目名称:vice-emu,代码行数:13,代码来源:uipalemu.c


示例2: init_rambanks_dialog

static void init_rambanks_dialog(HWND hwnd)
{
    int res_value;

    /* translate all dialog items */
    uilib_localize_dialog(hwnd, rambanks_dialog_trans);

    /* adjust the size of the elements in the datasette_sub_group */
    uilib_adjust_group_width(hwnd, rambanks_group);

    resources_get_int("C128FullBanks", &res_value);
    CheckDlgButton(hwnd, IDC_C128_FULL_BANKS, res_value ? BST_CHECKED : BST_UNCHECKED);
}
开发者ID:carriercomm,项目名称:VICE-Core,代码行数:13,代码来源:uic128.c


示例3: TUI_MENU_CALLBACK

static TUI_MENU_CALLBACK(digimax_base_submenu_callback)
{
    int value;
    static char s[100];

    resources_get_int("DIGIMAXbase", &value);
    if (value == 0xdd00) {
        sprintf(s, "Userport");
    } else {
        sprintf(s, "$%X", value);
    }
    return s;
}
开发者ID:kleopatra999,项目名称:VICE-2,代码行数:13,代码来源:uidigimax.c


示例4: video_resources_update_ui

static void video_resources_update_ui(video_canvas_t *canvas)
{
	int pal_enabled = 0;
	int ui_doublescan_enabled;

	if (canvas->videoconfig->cap->palemulation_allowed)
		resources_get_int("PALEmulation", &pal_enabled);

	if (canvas->videoconfig->double_size_enabled != 0)
		ui_doublescan_enabled = 1;
	else
		ui_doublescan_enabled = 0;
}
开发者ID:twinaphex,项目名称:vice-next,代码行数:13,代码来源:video-resources.c


示例5: UI_CALLBACK

/* unused ? */
static UI_CALLBACK(set_joystick_device)
{
    vsync_suspend_speed_eval();
    if (!CHECK_MENUS) {
        resources_set_int("JoyDevice1", vice_ptr_to_int(UI_MENU_CB_PARAM));
        ui_update_menus();
    } else {
        int tmp;

        resources_get_int("JoyDevice1", &tmp);
        ui_menu_set_tick(w, tmp == vice_ptr_to_int(UI_MENU_CB_PARAM));
    }
}
开发者ID:AreaScout,项目名称:vice,代码行数:14,代码来源:vic20ui.c


示例6: TUI_MENU_CALLBACK

static TUI_MENU_CALLBACK(speed_submenu_callback)
{
    static char s[1024];
    int value;

    resources_get_int("Speed", &value);
    if (value) {
        sprintf(s, "%d%%", value);
        return s;
    } else {
        return "None";
    }
}
开发者ID:bobsummerwill,项目名称:VICE,代码行数:13,代码来源:menudefs.c


示例7:

static const char *cbm2_get_keyboard_name(void)
{
    int idx;

    if (resources_get_int("KeymapIndex", &idx) != 0) {
        idx = 0;
    }
    if ((idx & 2) == 0) {
        return CBM2keyBusinessName;
    }

    return CBM2keyGraphicName;
}
开发者ID:BigBoss21X,项目名称:vice-emu,代码行数:13,代码来源:cbm2ui.c


示例8: ted_get_pixel_aspect

/* return pixel aspect ratio for current video mode
 * based on http://codebase64.com/doku.php?id=base:pixel_aspect_ratio
 */
static float ted_get_pixel_aspect(void)
{
    int video;
    resources_get_int("MachineVideoStandard", &video);
    switch (video) {
        case MACHINE_SYNC_PAL:
            return 1.03743478f;
        case MACHINE_SYNC_NTSC:
            return 0.85760931f;
        default:
            return 1.0f;
    }
}
开发者ID:SMTDDR,项目名称:droidsound,代码行数:16,代码来源:ted.c


示例9: init_autostart_dialog

static void init_autostart_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    const char *autostartfile;
    TCHAR *st_autostartfile;
    int xsize, ysize;
    int xsize2;
    RECT rect;

    uilib_localize_dialog(hwnd, autostart_dialog);
    uilib_get_group_extent(hwnd, autostart_leftgroup1, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, autostart_leftgroup1);
    uilib_move_and_adjust_group_width(hwnd, autostart_rightgroup1, xsize + 30);
    uilib_get_group_extent(hwnd, autostart_leftgroup2, &xsize2, &ysize);
    uilib_adjust_group_width(hwnd, autostart_leftgroup2);
    uilib_move_group(hwnd, autostart_rightgroup2, xsize2 + 30);

    /* get the max x of the rightgroup3 elements */
    uilib_get_group_max_x(hwnd, autostart_rightgroup3, &xsize);

    /* resize the text fill-in box */
    uilib_move_and_set_element_width(hwnd, IDC_AUTOSTART_DISK_IMAGE_FILE, 9, xsize - 9);

    /* set the width of the dialog to 'surround' all the elements */
    GetWindowRect(hwnd, &rect);
    MoveWindow(hwnd, rect.left, rect.top, xsize + 20, rect.bottom - rect.top, TRUE);

    /* recenter the buttons in the newly resized dialog window */
    uilib_center_buttons(hwnd, move_buttons_group, 0);

    resources_get_int("AutostartWarp", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_WARP, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("AutostartRunWithColon", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_USE_COLON_WITH_RUN, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    resources_get_int("AutostartBasicLoad", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_LOAD_TO_BASIC, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("AutostartDelayRandom", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_RANDOM_DELAY, res_value ? BST_CHECKED : BST_UNCHECKED);

    resources_get_int("AutostartHandleTrueDriveEmulation", &res_value);
    CheckDlgButton(hwnd, IDC_AUTOSTART_HANDLE_TRUE_DRIVE_EMULATION, res_value ? BST_CHECKED : BST_UNCHECKED);

    temp_hwnd = GetDlgItem(hwnd, IDC_AUTOSTART_PRG_MODE);
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)translate_text(IDS_AUTOSTART_VIRTUAL_FS));
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)translate_text(IDS_AUTOSTART_INJECT));
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)translate_text(IDS_AUTOSTART_DISK));
    resources_get_int("AutostartPrgMode", &res_value);
    SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)res_value, 0);

    resources_get_string("AutostartPrgDiskImage", &autostartfile);
    st_autostartfile = system_mbstowcs_alloc(autostartfile);
    SetDlgItemText(hwnd, IDC_AUTOSTART_DISK_IMAGE_FILE, autostartfile != NULL ? st_autostartfile : TEXT(""));
    system_mbstowcs_free(st_autostartfile);
}
开发者ID:carriercomm,项目名称:VICE-Core,代码行数:58,代码来源:uiautostart.c


示例10: UI_CALLBACK

/* this is partially modeled after the radio_* callbacks */
static UI_CALLBACK(set_KeyboardType)
{
    int current_value, new_value = 2 * vice_ptr_to_int(UI_MENU_CB_PARAM);

    resources_get_int("KeymapIndex", &current_value);
    if (!CHECK_MENUS) {
        if ((current_value & ~1) != new_value) {
            resources_set_int("KeymapIndex", (current_value & 1) + new_value);
            ui_update_menus();
        }
    } else {
        ui_menu_set_tick(w, (current_value & ~1) == new_value);
    }
}
开发者ID:AreaScout,项目名称:vice,代码行数:15,代码来源:petui.c


示例11: c64ui_draw_resid_string

void c64ui_draw_resid_string(unsigned char *screen, int menu_x, int menu_y)
{
  int sidengine;

  resources_get_int("SidEngine", &sidengine);
  if(sidengine)
  {
    draw_ascii_string(screen, display_width, menu_x, menu_y, "ReSID", menu_fg, menu_bg);
  }
  else
  {
    draw_ascii_string(screen, display_width, menu_x, menu_y, "FastSID", menu_fg, menu_bg);
  }
}
开发者ID:martinpiper,项目名称:VICE,代码行数:14,代码来源:c64ui.c


示例12: set_border_mode

static int set_border_mode(int val, void *param)
{
    int sync;

    if (resources_get_int("MachineVideoStandard", &sync) < 0) {
        sync = MACHINE_SYNC_PAL;
    }

    if (vicii_resources.border_mode != val) {
        vicii_resources.border_mode = val;
        machine_change_timing(sync ^ VICII_BORDER_MODE(vicii_resources.border_mode));
    }
    return 0;
}
开发者ID:Chegwin,项目名称:GBA4iOS-2.0-Beta-4,代码行数:14,代码来源:vicii-resources.c


示例13: petui_set_menu_params

void petui_set_menu_params(int index, menu_draw_t *menu_draw)
{
    static int old_keymap = -1;
    int cols, keymap;

    resources_get_int("VideoSize", &cols);

    menu_draw->max_text_x = cols ? cols : 40;
    menu_draw->extra_x = 32;
    menu_draw->extra_y = (cols == 40) ? 40 : 28;

    resources_get_int("KeymapIndex", &keymap);

    keymap &= 2;
    if (keymap != old_keymap) {
        if (keymap) {
            sdl_vkbd_set_vkbd(&vkbd_pet_gr);
        } else {
            sdl_vkbd_set_vkbd(&vkbd_pet_uk);
        }
        old_keymap = keymap;
    }
}
开发者ID:AreaScout,项目名称:vice,代码行数:23,代码来源:xpet_ui.c


示例14: init_speed_dialog

static void init_speed_dialog(HWND hwnd)
{
    int res_value;
    char *speedstr;
    TCHAR *st_speedstr;

    resources_get_int("Speed", &res_value);

    speedstr = lib_msprintf("%i", res_value);
    st_speedstr = system_mbstowcs_alloc(speedstr);
    SetDlgItemText(hwnd, IDC_CUSTOM_SPEED, st_speedstr);
    system_mbstowcs_free(st_speedstr);
    lib_free(speedstr);
}
开发者ID:martinpiper,项目名称:VICE,代码行数:14,代码来源:uispeed.c


示例15: TUI_MENU_CALLBACK

static TUI_MENU_CALLBACK(sid_engine_model_submenu_callback)
{
    char *s;
    int temp;
    int value;

    resources_get_int("SidModel", &temp);
    resources_get_int("SidEngine", &value);
    value <<= 8;
    value |= temp;
    switch (value) {
        case SID_FASTSID_6581:
            s = "6581 (Fast SID)";
            break;
        case SID_FASTSID_8580:
            s = "8580 (Fast SID)";
            break;
#ifdef HAVE_PARSID
        case SID_PARSID_PORT1:
            s = "ParSID in Port 1";
            break;
        case SID_PARSID_PORT2:
            s = "ParSID in Port 2";
            break;
        case SID_PARSID_PORT3:
            s = "ParSID in Port 3";
            break;
#endif
        case SID_CATWEASELMKIII:
            s = "Catweasel";
            break;
        case SID_HARDSID:
            s = "HardSID";
            break;
    }
    return s;
}
开发者ID:AreaScout,项目名称:vice,代码行数:37,代码来源:uisidcart.c


示例16: UI_CALLBACK

static UI_CALLBACK(set_custom_refresh_rate)
{
    static char input_string[32];
    char *msg_string;
    ui_button_t button;
    int i;
    int current_refresh_rate;

    resources_get_int("RefreshRate", &current_refresh_rate);

    if (!*input_string) {
        sprintf(input_string, "%d", current_refresh_rate);
    }

    if (CHECK_MENUS) {
        if (current_refresh_rate < 0 || current_refresh_rate > 10) {
            ui_menu_set_tick(w, 1);
        } else {
            ui_menu_set_tick(w, 0);
        }
    } else {
        int current_speed;

        vsync_suspend_speed_eval();
        msg_string = lib_stralloc(_("Enter refresh rate"));
        button = ui_input_string(_("Refresh rate"), msg_string, input_string, 32);
        lib_free(msg_string);
        if (button == UI_BUTTON_OK) {
            i = atoi(input_string);
            resources_get_int("Speed", &current_speed);
            if (!(current_speed <= 0 && i <= 0) && i >= 0 && current_refresh_rate != i) {
                resources_set_int("RefreshRate", i);
                ui_update_menus();
            }
        }
    }
}
开发者ID:bobsummerwill,项目名称:VICE,代码行数:37,代码来源:uisettings.c


示例17: mem_write_rom_snapshot_module

static int mem_write_rom_snapshot_module(snapshot_t *s)
{
    snapshot_module_t *m;
    int trapfl;

    /* Main memory module.  */

    m = snapshot_module_create(s, snap_rom_module_name,
                               SNAP_ROM_MAJOR, SNAP_ROM_MINOR);
    if (m == NULL)
        return -1;

    /* disable traps before saving the ROM */
    resources_get_int("VirtualDevices", &trapfl);
    resources_set_int("VirtualDevices", 0);

    if (0
        || SMW_BA(m, c128memrom_kernal_rom,  C128_KERNAL_ROM_SIZE) < 0
        || SMW_BA(m, c128memrom_basic_rom, C128_BASIC_ROM_SIZE) < 0
        || SMW_BA(m, c128memrom_basic_rom + C128_BASIC_ROM_SIZE,
        C128_EDITOR_ROM_SIZE) < 0
        || SMW_BA(m, mem_chargen_rom, C128_CHARGEN_ROM_SIZE) < 0)
        goto fail;

    /* FIXME: save cartridge ROM (& RAM?) areas:
       first write out the configuration, i.e.
       - type of cartridge (banking scheme type)
       - state of cartridge (active/which bank, ...)
       then the ROM/RAM arrays:
       - cartridge ROM areas
       - cartridge RAM areas
    */

    /* enable traps again when necessary */
    resources_set_int("VirtualDevices", trapfl);

    if (snapshot_module_close(m) < 0)
        goto fail;

    return 0;

 fail:
    /* enable traps again when necessary */
    resources_set_int("VirtualDevices", trapfl);

    if (m != NULL)
        snapshot_module_close(m);
    return -1;
}
开发者ID:BigBoss21X,项目名称:vice-emu,代码行数:49,代码来源:c128memsnapshot.c


示例18: init_soundexpander_dialog

static void init_soundexpander_dialog(HWND hwnd)
{
    HWND temp_hwnd;
    int res_value;
    int xsize, ysize;

    uilib_localize_dialog(hwnd, soundexpander_dialog);

    if (machine_class == VICE_MACHINE_VIC20) {
        uilib_localize_dialog(hwnd, soundexpander_mascuerade_dialog);
    }

    uilib_get_group_extent(hwnd, soundexpander_leftgroup, &xsize, &ysize);
    uilib_adjust_group_width(hwnd, soundexpander_left_total_group);
    uilib_move_group(hwnd, soundexpander_rightgroup, xsize + 30);

    resources_get_int("SFXSoundExpander", &res_value);
    CheckDlgButton(hwnd, IDC_SFX_SOUNDEXPANDER_ENABLE, res_value ? BST_CHECKED : BST_UNCHECKED);
    
    if (machine_class == VICE_MACHINE_VIC20) {
        resources_get_int("SFXSoundExpanderIOSwap", &res_value);
        CheckDlgButton(hwnd, IDC_SFX_SOUNDEXPANDER_IO_SWAP, res_value ? BST_CHECKED : BST_UNCHECKED);
    }

    temp_hwnd = GetDlgItem(hwnd, IDC_SFX_SOUNDEXPANDER_TYPE);

    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"3526");
    SendMessage(temp_hwnd, CB_ADDSTRING, 0, (LPARAM)"3812");
    resources_get_int("SFXSoundExpanderChip", &res_value);
    if (res_value == 3526) {
        SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)0, 0);
    } else {
        SendMessage(temp_hwnd, CB_SETCURSEL, (WPARAM)1, 0);
    }
    enable_soundexpander_controls(hwnd);
}
开发者ID:AreaScout,项目名称:vice,代码行数:36,代码来源:uisoundexpander.c


示例19: _ui_menu_toggle_helper

void _ui_menu_toggle_helper(Widget w, ui_callback_data_t client_data, ui_callback_data_t call_data, const char *resource_name)
{
    int current_value;

    if (resources_get_int(resource_name, &current_value) < 0) {
        return;
    }

    if (!call_data) {
        resources_set_int(resource_name, !current_value);
        ui_update_menus();
    } else {
        ui_menu_set_tick(w, current_value);
    }
}
开发者ID:bobsummerwill,项目名称:VICE,代码行数:15,代码来源:uimenu.c


示例20: _ui_menu_radio_helper

void _ui_menu_radio_helper(Widget w, ui_callback_data_t client_data, ui_callback_data_t call_data, const char *resource_name)
{
    int current_value;

    resources_get_int(resource_name, &current_value);

    if (!call_data) {
        if (current_value != vice_ptr_to_int(client_data)) {
            resources_set_int(resource_name, vice_ptr_to_int(client_data));
            ui_update_menus();
        }
    } else {
        ui_menu_set_tick(w, current_value == vice_ptr_to_int(client_data));
    }
}
开发者ID:bobsummerwill,项目名称:VICE,代码行数:15,代码来源:uimenu.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ resources_register_int函数代码示例发布时间:2022-05-30
下一篇:
C++ resources函数代码示例发布时间: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