本文整理汇总了C++中resources_get_int函数的典型用法代码示例。如果您正苦于以下问题:C++ resources_get_int函数的具体用法?C++ resources_get_int怎么用?C++ resources_get_int使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resources_get_int函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例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));
}
}
示例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";
}
}
示例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;
}
示例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;
}
}
示例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);
}
示例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", ¤t_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);
}
}
示例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);
}
}
示例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;
}
示例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;
}
}
示例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);
}
示例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;
}