这篇教程C++ update_screen函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中update_screen函数的典型用法代码示例。如果您正苦于以下问题:C++ update_screen函数的具体用法?C++ update_screen怎么用?C++ update_screen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了update_screen函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: Gpm_GetEventint Gpm_GetEvent(Gpm_Event *e){ VimEvent event; int n = read(gpm_fd, (void*)&event, sizeof(VimEvent)); if(event.type == VIM_EVENT_TYPE_GPM) { memcpy(e, (void*)&event.event.gpm, sizeof(Gpm_Event)); return 1; }else if(event.type == VIM_EVENT_TYPE_CMD) { do_cmdline_cmd((char_u *) event.event.cmd); }else if(event.type == VIM_EVENT_TYPE_RELINE) { char* str = event.event.cmd; ml_replace(curwin->w_cursor.lnum,(char_u*)str, TRUE); changed_lines(curwin->w_cursor.lnum, 0, curwin->w_cursor.lnum, 1L); }else if(event.type == VIM_EVENT_TYPE_UPDATE){ vimtouch_lock(); update_screen(0); setcursor(); out_flush(); vimtouch_unlock(); }else if(event.type == VIM_EVENT_TYPE_SETCOL){ curwin->w_cursor.col = event.event.num; }else if(event.type == VIM_EVENT_TYPE_SCROLL){ int do_scroll = event.event.num; scroll_redraw(do_scroll > 0, do_scroll>0?do_scroll:-do_scroll); }else if(event.type == VIM_EVENT_TYPE_RESIZE){ out_flush(); shell_resized_check(); redraw_later(CLEAR); update_screen(CLEAR); out_flush(); } return 0;}
开发者ID:WoodyGuo,项目名称:vimtouch,代码行数:33,
示例2: Gpm_GetEventint Gpm_GetEvent(Gpm_Event *e){ VimEvent event; int n = read(gpm_fd, (void*)&event, sizeof(VimEvent)); if(event.type == VIM_EVENT_TYPE_GPM) { memcpy(e, (void*)&event.event.gpm, sizeof(Gpm_Event)); return 1; }else if(event.type == VIM_EVENT_TYPE_ANDROID_SEND) { vimtouch_send_android_event(event.event.num, (char_u *) &event.event.nums[1]); return 0; }else if(event.type == VIM_EVENT_TYPE_CMD) { do_cmdline_cmd((char_u *) event.event.cmd); }else if(event.type == VIM_EVENT_TYPE_RELINE) { char* str = event.event.cmd; ml_replace(curwin->w_cursor.lnum,(char_u*)str, TRUE); changed_lines(curwin->w_cursor.lnum, 0, curwin->w_cursor.lnum, 1L); }else if(event.type == VIM_EVENT_TYPE_UPDATE){ //vimtouch_lock(); update_screen(0); setcursor(); out_flush(); //vimtouch_unlock(); }else if(event.type == VIM_EVENT_TYPE_CURSOR){ mouse_col = event.event.nums[0]; mouse_row = event.event.nums[1]; jump_to_mouse(MOUSE_DID_MOVE, NULL, 0); }else if(event.type == VIM_EVENT_TYPE_SETCOL){ curwin->w_cursor.col = event.event.num; }else if(event.type == VIM_EVENT_TYPE_SCROLL){ int do_scroll = event.event.num; scroll_redraw(do_scroll > 0, do_scroll>0?do_scroll:-do_scroll); }else if(event.type == VIM_EVENT_TYPE_RESIZE){ out_flush(); shell_resized_check(); redraw_later(CLEAR); out_flush(); }else if(event.type == VIM_EVENT_TYPE_SETTAB){ int nr = event.event.nums[0]; if (nr != tabpage_index(curtab)){ current_tab = nr; if (current_tab == 255) /* -1 in a byte gives 255 */ current_tab = -1; goto_tabpage(current_tab); update_screen(CLEAR); out_flush(); } }else if(event.type == VIM_EVENT_TYPE_HISTORY){ char buf[1024]; int i = 1; for(i = 1; i <= 10; i++){ sprintf(buf, "HISTORY:%d,%s/n",i-1,get_history_entry(HIST_CMD,i)); write(gpm_fd,buf,strlen(buf)); } } vimtouch_sync(); return 0;}
开发者ID:kvj,项目名称:vimtouch,代码行数:59,
示例3: luaV_window_newindex static intluaV_window_newindex (lua_State *L){ win_T *w = (win_T *) luaV_checkvalid(L, luaV_Window, 1); const char *s = luaL_checkstring(L, 2); int v = luaL_checkinteger(L, 3); if (strncmp(s, "line", 4) == 0) {#ifdef HAVE_SANDBOX luaV_checksandbox(L);#endif if (v < 1 || v > w->w_buffer->b_ml.ml_line_count) luaL_error(L, "line out of range"); w->w_cursor.lnum = v; update_screen(VALID); } else if (strncmp(s, "col", 3) == 0) {#ifdef HAVE_SANDBOX luaV_checksandbox(L);#endif w->w_cursor.col = v - 1; update_screen(VALID); }#ifdef FEAT_VERTSPLIT else if (strncmp(s, "width", 5) == 0) { win_T *win = curwin;#ifdef FEAT_GUI need_mouse_correct = TRUE;#endif curwin = w; win_setwidth(v); curwin = win; }#endif else if (strncmp(s, "height", 6) == 0) { win_T *win = curwin;#ifdef FEAT_GUI need_mouse_correct = TRUE;#endif curwin = w; win_setheight(v); curwin = win; } else luaL_error(L, "invalid window property: `%s'", s); return 0;}
开发者ID:LeonB,项目名称:vim,代码行数:50,
示例4: fade_in_1// seg001:1029int __pascal far fade_in_1() {#ifdef USE_FADE// sbyte index; word interrupted; if (graphics_mode == gmMcgaVga) { fade_palette_buffer = make_pal_buffer_fadein(offscreen_surface, 0x6689, /*0*/ 2); is_global_fading = 1; do { interrupted = proc_cutscene_frame(1); if (interrupted == 1) { return 1; } } while (interrupted == 0); is_global_fading = 0; } else { // ... } return 0;#else // stub method_1_blit_rect(onscreen_surface_, offscreen_surface, &screen_rect, &screen_rect, 0); update_screen();// SDL_UpdateRect(onscreen_surface_, 0, 0, 0, 0); // debug return 0;#endif}
开发者ID:Falcury,项目名称:SDLPoP,代码行数:27,
示例5: update_screenSLOT_INTERFACE_ENDUINT32 rm380z_state::screen_update_rm380z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ update_screen(bitmap); return 0;}
开发者ID:ccmurray,项目名称:mame,代码行数:7,
示例6: ScreenUpdateLoopstatic void *ScreenUpdateLoop( DirectThread *thread, void *arg ){ pthread_mutex_lock( &dfb_sdl->update.lock ); D_DEBUG_AT( SDL_Updates, "Entering %s().../n", __FUNCTION__ ); while (!dfb_sdl->update.quit) { if (dfb_sdl->update.pending) { DFBRectangle update = DFB_RECTANGLE_INIT_FROM_REGION( &dfb_sdl->update.region ); dfb_sdl->update.pending = false; D_DEBUG_AT( SDL_Updates, "Got update %d,%d - %dx%d.../n", DFB_RECTANGLE_VALS( &update ) ); pthread_mutex_unlock( &dfb_sdl->update.lock ); update_screen( update.x, update.y, update.w, update.h ); pthread_mutex_lock( &dfb_sdl->update.lock ); } else pthread_cond_wait( &dfb_sdl->update.cond, &dfb_sdl->update.lock ); } D_DEBUG_AT( SDL_Updates, "Returning from %s().../n", __FUNCTION__ ); pthread_mutex_unlock( &dfb_sdl->update.lock ); return NULL;}
开发者ID:batman52,项目名称:dingux-code,代码行数:33,
示例7: cmd_ctrl_mstatic voidcmd_ctrl_m(key_info_t key_info, keys_info_t *keys_info){ static menu_info *saved_menu; *mode = NORMAL_MODE; saved_menu = menu; if(execute_menu_cb(curr_view, menu) != 0) { *mode = MENU_MODE; menu_redraw(); return; } if(*mode != MENU_MODE) { reset_popup_menu(saved_menu); } else if(menu != saved_menu) { reset_popup_menu(saved_menu); update_menu(); } if(was_redraw) update_screen(UT_FULL); else update_all_windows();}
开发者ID:ackeack,项目名称:workenv,代码行数:29,
示例8: draw_tankvoid draw_tank (Sint16 x, Sint16 y, Uint8 color, Sint16 tank_cannon_angle, Sint16 zoom){ Sint16 x_rel = x - world_up_x; Sint16 y_rel = y - world_up_y; Sint16 tank_x1 = (x_rel * zoom) + (zoom / 4); Sint16 tank_y1 = (y_rel * zoom) + (zoom / 4); Sint16 tank_x2 = (x_rel * zoom) + (zoom - (zoom / 4)); Sint16 tank_y2 = (y_rel * zoom) + (zoom - (zoom / 4)); Sint16 tank_left_chain_x = tank_x1 - (zoom / 8); Sint16 tank_right_chain_x = tank_x2 + (zoom / 8); Sint16 tank_cannon_x = tank_x1 + (tank_x2 - tank_x1) / 2; Sint16 tank_cannon_y = tank_y1 + (tank_y2 - tank_y1) / 2; Sint16 tank_cannon_width = zoom / 8; Sint16 tank_cannon_length = zoom; /* draw tank */ boxRGBA (screen, tank_x1, tank_y1, tank_x2, tank_y2, unit_color[color].r, unit_color[color].g, unit_color[color].b, 255); boxRGBA (screen, tank_left_chain_x, tank_y1, tank_x1, tank_y2, 0, 0, 0, 255); boxRGBA (screen, tank_right_chain_x, tank_y1, tank_x2, tank_y2, 0, 0, 0, 255); filledCircleRGBA (screen, tank_cannon_x, tank_cannon_y, tank_cannon_width, 0, 0, 0, 255); draw_line_rotated (screen, tank_cannon_x, tank_cannon_y, tank_cannon_length, tank_cannon_angle, tank_cannon_width / 2, 0, 0, 0); update_screen ();}
开发者ID:koder77,项目名称:battle0,代码行数:31,
示例9: neogeo_runstatic void neogeo_run(void){ while (Loop >= LOOP_RESET) { neogeo_reset(); while (Loop == LOOP_EXEC) { if (Sleep) { cache_sleep(1); do { sceKernelDelayThread(5000000); } while (Sleep); cache_sleep(0); autoframeskip_reset(); } apply_cheat();//davex timer_update_cpu(); update_screen(); update_inputport(); } video_clear_screen(); sound_mute(1); }}
开发者ID:AMSMM,项目名称:NJEMU,代码行数:32,
示例10: confirm// 0 for false, 1 for trueint confirm(const char *label) { int ret = -1; char str[64]; DECL_LINE(yesbtn); DECL_LINE(nobtn); strcpy(sbstr, "confirm action"); if (label == NULL) strcpy(str, "are you sure?"); else sprintf(str, "are you sure you want to %s?", label); clear_screen(); START_LIST(16, 96, 416, 0xFF00FF00, 0xFF0000FF, 0xFFC0C0C0); text(str, 16,16, 2,2, 0xFFC0C0C0, 0x00000000); DRAW_LINE(yesbtn, "yes", "perform the action"); DRAW_LINE(nobtn, "no", "cancel the action and return to the previous screen"); while (ret == -1) { update_screen(); input_read(); if (BTN_CLICKED(yesbtn)) ret = 1; else if (BTN_CLICKED(nobtn)) ret = 0; } return ret;}
开发者ID:willcast,项目名称:nsboot,代码行数:33,
示例11: cpu_68k_dpg_stepvoid cpu_68k_dpg_step(void) { static Uint32 nb_cycle; static Uint32 line_cycle; Uint32 cpu_68k_timeslice = 200000; Uint32 cpu_68k_timeslice_scanline = 200000/(float)262; Uint32 cycle; if (nb_cycle==0) { main_loop(); /* update event etc. */ } cycle=cpu_68k_run_step(); add_bt(cpu_68k_getpc()); line_cycle+=cycle; nb_cycle+=cycle; if (nb_cycle>=cpu_68k_timeslice) { nb_cycle=line_cycle=0; if (conf.raster) { update_screen(); } else { neo_interrupt(); } state_handling(pending_save_state,pending_load_state); cpu_68k_interrupt(1); } else { if (line_cycle>=cpu_68k_timeslice_scanline) { line_cycle=0; if (conf.raster) { if (update_scanline()) cpu_68k_interrupt(2); } } }}
开发者ID:gillotte,项目名称:gxgeo,代码行数:32,
示例12: mainint main() { init(0); open_screen_stream(); int edgeDetectedImage[320][240]; int prevEdgeDetected[320][240]; double correlation[32][32]; while(1) { take_picture(); convert_camera_to_screen(); for(int i=16;i<320-16;i++) { for(int j=16;j<240-16;j++) { for(int k=-16;k<16;k++) { for(int l=-16;l<16;l++) { correlation[k+16][l+16] = sqrt((double)(get_pixel(i,j,3)*prevEdgeDetected[i+k][j+l])); } } } } for(int k=0;k<32;k++) { for(int l=0;l<32;l++) { put_pixel(k+400,l+400,correlation[k][l],0,0); } } update_screen(); for(int i=0;i<320;i++) { for(int j=0;j<240;j++) { prevEdgeDetected[i][j] = edgeDetectedImage[i][j]; } } }}
开发者ID:91Seconds,项目名称:Autonomous-Control,代码行数:34,
示例13: close_windowvoid close_window(int pid, wm_closewin_t *req) { /* close the window */ win_info_t *win = get_win_info(pid, req->id); win_info_t *ptr = first; win_info_t *prev = NULL; if (!win) return; /* remove from linked list */ while (ptr && ptr != win) ptr = (prev = ptr)->next; if (!prev) first = win->next; else prev->next = win->next; /* deallocate */ free(win->pixbuf); free(win->ico->buf); free(win->ico); free(win); /* redraw screen */ update_screen();}
开发者ID:amrsekilly,项目名称:quafios,代码行数:28,
示例14: luaV_buffer_insert static intluaV_buffer_insert(lua_State *L){ luaV_Buffer *lb = luaV_checkudata(L, 1, LUAVIM_BUFFER); buf_T *b = (buf_T *) luaV_checkcache(L, (void *) *lb); linenr_T last = b->b_ml.ml_line_count; linenr_T n = (linenr_T) luaL_optinteger(L, 3, last); buf_T *buf; luaL_checktype(L, 2, LUA_TSTRING);#ifdef HAVE_SANDBOX luaV_checksandbox(L);#endif /* fix insertion line */ if (n < 0) n = 0; if (n > last) n = last; /* insert */ buf = curbuf; curbuf = b; if (u_save(n, n + 1) == FAIL) { curbuf = buf; luaL_error(L, "cannot save undo information"); } else if (ml_append(n, luaV_toline(L, 2), 0, FALSE) == FAIL) { curbuf = buf; luaL_error(L, "cannot insert line"); } else appended_lines_mark(n, 1L); curbuf = buf; update_screen(VALID); return 0;}
开发者ID:LeonB,项目名称:vim,代码行数:34,
示例15: pcm_play_bufint pcm_play_buf(char *buf,unsigned int length, unsigned int bytes_per_sample, unsigned int bit_depth){ unsigned char *p=b.pcm_buffer; while(length-->0 && p<b.end) { unsigned int val=0; switch(bytes_per_sample) { case 4: val = (*(buf+2)<<16) + (*(buf+3)<<24); case 2: val+=*buf + (*(buf+1)<<8); break; default: return 0; } /* if bit depth is 32, shift right 16 */ /* if bit depth is 30, shift right 14 */ /* if bit depth is 29, >> 13 */ buf+=bytes_per_sample; val = val >> (bit_depth -15); *p++=(val & 0xff); *p++=((val & 0xff00)>>8); } int bytes=p-b.pcm_buffer; update_screen(); ao_play(pcm_out_device,b.pcm_buffer,bytes); return bytes/2;}
开发者ID:fengchihao,项目名称:minipod,代码行数:29,
示例16: hanoivoid hanoi(int from, int to, int via, int n){ if (n > 0) hanoi(from, via, to, n-1); int from_ptr = --stackptr[from]; int to_ptr = stackptr[to]++; int k = stacks[from][from_ptr]; stacks[from][from_ptr] = 0; stacks[to][to_ptr] = k; update_screen(); for (int k = 0; k < 10; k++) { draw_banner(banner_pos); if (++banner_pos == 96) banner_pos = 0; for (int i = 0; i < 100000; i++) asm volatile (""); } if (n > 0) hanoi(via, to, from, n-1);}
开发者ID:cliffordwolf,项目名称:icotools,代码行数:27,
示例17: restore_primary_color_scheme/* Restore previous state of primary color scheme. */static voidrestore_primary_color_scheme(const col_scheme_t *cs){ cfg.cs = *cs; load_color_scheme_colors(); update_screen(UT_FULL);}
开发者ID:KryDos,项目名称:vifm,代码行数:8,
示例18: query_user_menuintquery_user_menu(char *title, char *message){ int key; char *dup = strdup(message); curr_stats.errmsg_shown = 2; redraw_error_msg(title, message, 0); do { key = wgetch(error_win); } while(key != 'y' && key != 'n' && key != ERR); free(dup); curr_stats.errmsg_shown = 0; werase(error_win); wrefresh(error_win); touchwin(stdscr); update_all_windows(); if(curr_stats.need_update != UT_NONE) update_screen(UT_FULL); return key == 'y';}
开发者ID:lyuts,项目名称:vifm,代码行数:32,
示例19: damage_timerstatic CARD32damage_timer(OsTimerPtr timer, CARD32 time, pointer arg){ struct omap_screen_info *omaps = arg; int needUpdate = 0; RegionPtr region = NULL;#ifdef XSP xspScrPrivPtr xsp_priv = NULL;#endif#ifdef XSP if (xspScrPrivateIndex > 0) { xsp_priv = xspGetScrPriv(omaps->screen->pScreen); if (xsp_priv && xsp_priv->dsp_enabled) needUpdate = 1; }#endif if (!omaps->damage) { omaps->timer_active = 0; omaps->empty_updates = 0; return 0; }#ifdef PROFILE_ME_HARDER omaps->updates++; if (omaps->updates > (5000 / OMAP_UPDATE_TIME)) video_stats(omaps, time);#endif region = DamageRegion(omaps->damage); if (REGION_NOTEMPTY(omaps->screen->pScreen, region)) { accumulate_damage(omaps, region); DamageEmpty(omaps->damage); } if (!region_is_null(omaps)) needUpdate = 1; if (needUpdate) { omaps->empty_updates = 0; update_screen(omaps); } else { omaps->empty_updates++; }#if !defined(PROFILE_ME_HARDER) && !defined(DEBUG) /* Kill the timer if we've gone more than 500ms without an update. */ if (omaps->empty_updates >= 500 / OMAP_UPDATE_TIME) { omaps->timer_active = 0; omaps->empty_updates = 0; return 0; } else#endif { return OMAP_UPDATE_TIME; }}
开发者ID:GrahamCobb,项目名称:maemo-xsisusb,代码行数:60,
示例20: luaV_command static intluaV_command(lua_State *L){ do_cmdline_cmd((char_u *) luaL_checkstring(L, 1)); update_screen(VALID); return 0;}
开发者ID:LeonB,项目名称:vim,代码行数:7,
示例21: tt_process_monstersvoid tt_process_monsters(struct dm_map *map) { struct msr_monster *monster = NULL; monster = NULL; while ( (monster = msrlst_get_next_monster(monster) ) != NULL) { if (monster->dead) { /* Clean-up monsters which can be cleaned up. */ if (monster->controller.controller_cb == NULL) { struct msr_monster *dead_monster = monster; monster = msrlst_get_next_monster(monster); msr_destroy(dead_monster, map); continue; } } bool do_action = false; msr_change_energy(monster, TT_ENERGY_TICK); if (msr_get_energy(monster) >= TT_ENERGY_FULL) do_action = true; if (monster->controller.interrupted == true) do_action = true; /* A stunned monster can do nothing. */ if (se_has_effect(monster, EF_STUNNED) ) { do_action = false; /* Player is a bit special and would like to see something... */ if (monster->is_player) update_screen(); } if (do_action || monster->dead) { if (monster->controller.controller_cb != NULL) { monster->controller.controller_cb(monster); } monster->controller.interrupted = false; if (gbl_game->player_data.exit_map == true) return; if (dm_get_map_me(&monster->pos, map)->visible) { update_screen(); } } if (gbl_game->running == false) return; }}
开发者ID:luctius,项目名称:heresyrl,代码行数:47,
示例22: reissue_connectionstatic bool reissue_connection(struct config_info *conf, struct host **h, char *host_name){ bool ret = false; int buf_len; assert(h != NULL); /* We might be passed an existing socket. If we have been, close * and destroy the associated host, and create a new one. */ if(*h) host_destroy(*h); *h = host_create(HOST_TYPE_TCP, HOST_FAMILY_IPV4); if(!*h) { error("Failed to create TCP client socket.", 1, 8, 0); goto err_out; } m_hide(); buf_len = snprintf(widget_buf, WIDGET_BUF_LEN, "Connecting to /"%s/". Please wait..", host_name); widget_buf[WIDGET_BUF_LEN - 1] = 0; draw_window_box(3, 11, 76, 13, DI_MAIN, DI_DARK, DI_CORNER, 1, 1); write_string(widget_buf, (WIDGET_BUF_LEN - buf_len) >> 1, 12, DI_TEXT, 0); update_screen(); if(!host_connect(*h, host_name, OUTBOUND_PORT)) { buf_len = snprintf(widget_buf, WIDGET_BUF_LEN, "Connection to /"%s/" failed.", host_name); widget_buf[WIDGET_BUF_LEN - 1] = 0; error(widget_buf, 1, 8, 0); } else ret = true; clear_screen(32, 7); m_show(); update_screen();err_out: return ret;}
开发者ID:colin-branch,项目名称:megazeux,代码行数:47,
示例23: _mainvoid _main(){ do { memset(dbl_buffer, 0, SCREEN_W * SCREEN_H); update_screen(); } while (1);}
开发者ID:Piso94,项目名称:MudStorm-OS,代码行数:8,
示例24: vim_command/// Executes an ex-mode command str////// @param str The command str/// @param[out] err Details of an error that may have occurredvoid vim_command(String str, Error *err){ // Run the command try_start(); do_cmdline_cmd((char_u *) str.data); update_screen(VALID); try_end(err);}
开发者ID:alex-vim,项目名称:neovim,代码行数:12,
示例25: plugin_startenum plugin_status plugin_start(const void* parameter){ int button; (void)parameter; files = 0; dirs = 0; musicfiles = 0; largestdir = 0; cancel = false; rb->splash(HZ, "Counting..."); update_screen(); lasttick = *rb->current_tick; traversedir("", ""); if (cancel) { rb->splash(HZ, "Aborted"); return PLUGIN_OK; } update_screen();#ifdef HAVE_REMOTE_LCD rb->remote_backlight_on();#endif rb->backlight_on(); rb->splash(HZ, "Done"); update_screen(); while (1) { button = rb->button_get(true); switch (button) {#ifdef HAVE_REMOTE_LCD case STATS_STOP_REMOTE:#endif case STATS_STOP: return PLUGIN_OK; break; default: if (rb->default_event_handler(button) == SYS_USB_CONNECTED) { return PLUGIN_USB_CONNECTED; } break; } } return PLUGIN_OK;}
开发者ID:a-martinez,项目名称:rockbox,代码行数:46,
示例26: hide_suggestion_box/* Removes suggestion box from the screen. */static voidhide_suggestion_box(void){ if(should_display_suggestion_box()) { update_screen(UT_REDRAW); }}
开发者ID:vifm,项目名称:vifm,代码行数:9,
示例27: nvim_command/// Executes an ex-command./// On VimL error: Returns the VimL error; v:errmsg is not updated.////// @param command Ex-command string/// @param[out] err Error details (including actual VimL error), if anyvoid nvim_command(String command, Error *err){ // Run the command try_start(); do_cmdline_cmd(command.data); update_screen(VALID); try_end(err);}
开发者ID:apriendeau,项目名称:neovim,代码行数:13,
示例28: traversedirvoid traversedir(char* location, char* name){ int button; struct dirent *entry; DIR* dir; char fullpath[MAX_PATH]; int files_in_dir = 0; rb->snprintf(fullpath, sizeof(fullpath), "%s/%s", location, name); dir = rb->opendir(fullpath); if (dir) { entry = rb->readdir(dir); while (entry) { if (cancel) break; /* Skip .. and . */ if (rb->strcmp(entry->d_name, ".") && rb->strcmp(entry->d_name, "..")) { if (entry->attribute & ATTR_DIRECTORY) { traversedir(fullpath, entry->d_name); dirs++; } else { char *ptr = rb->strrchr(entry->d_name,'.'); files++; files_in_dir++; /* Might want to only count .mp3, .ogg etc. */ if(ptr){ unsigned i; ptr++; for(i=0;i<sizeof(music_exts)/sizeof(char*);i++) if(!rb->strcasecmp(ptr,music_exts[i])){ musicfiles++; break; } } } } if (*rb->current_tick - lasttick > (HZ/2)) { update_screen(); lasttick = *rb->current_tick; button = rb->button_get(false); if (button == STATS_STOP#ifdef HAVE_REMOTE_LCD || button == STATS_STOP_REMOTE#endif ) { cancel = true; break; } } entry = rb->readdir(dir); } rb->closedir(dir); } if (largestdir < files_in_dir) largestdir = files_in_dir;}
开发者ID:a-martinez,项目名称:rockbox,代码行数:58,
示例29: ask_charchar ask_char(char *question){ gtkey c; gtprintf(question); update_screen(); c = gtgetch(); return c;}
开发者ID:abstrakct,项目名称:gt2,代码行数:9,
注:本文中的update_screen函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ update_screen_locked函数代码示例 C++ update_rmtp函数代码示例 |