void flush_block (int ystart, int ystop) { uae4all_prof_start(13); #ifdef DEBUG_GFX dbgf("Function: flush_block %d %d\n", ystart, ystop); #endif //__android_log_print(ANDROID_LOG_INFO, "libSDL", "ystart: %d ystop: %d", ystart, ystop); #ifndef DREAMCAST SDL_UnlockSurface (prSDLScreen); #endif #if defined (GP2X) || defined (PSP) || defined (GIZMONDO) if (vkbd_mode) { vkbd_key=vkbd_process(); } if (show_inputmode) { inputmode_redraw(); } #ifdef GP2X else if (show_volumecontrol) { volumecontrol_redraw(); } #endif #endif #if !defined (DOUBLEBUFFER) SDL_UpdateRect(prSDLScreen, 0, ystart, current_width, ystop-ystart+1); #endif if (drawfinished) { drawfinished=0; #if !defined (GP2X) && !defined (PSP) && !defined (GIZMONDO) if (vkbd_mode) vkbd_key=vkbd_process(); #endif #ifdef DOUBLEBUFFER SDL_Flip(prSDLScreen); #endif } #ifndef DREAMCAST SDL_LockSurface (prSDLScreen); #endif uae4all_prof_end(13); }
void flush_screen () { //SDL_UnlockSurface (prSDLScreen); if (show_inputmode) { inputmode_redraw(); } if (savestate_state == STATE_DOSAVE) { if(delay_savestate_frame > 0) --delay_savestate_frame; else { CreateScreenshot(); save_thumb(screenshot_filename); savestate_state = 0; } } unsigned long start = read_processor_time(); //if(start < next_synctime && next_synctime - start > time_per_frame - 1000) // usleep((next_synctime - start) - 1000); //SDL_Flip(prSDLScreen); if (current_resource_amigafb == 1) { current_resource_amigafb = 0; vc_dispmanx_resource_write_data( dispmanxresource_amigafb_1, VC_IMAGE_RGB565, gfxvidinfo.width * 2, gfxvidinfo.bufmem, &blit_rect ); dispmanxupdate = vc_dispmanx_update_start( 10 ); vc_dispmanx_element_change_source(dispmanxupdate,dispmanxelement,dispmanxresource_amigafb_1); vc_dispmanx_update_submit(dispmanxupdate,vsync_callback,NULL); //vc_dispmanx_update_submit_sync(dispmanxupdate); } else { current_resource_amigafb = 1; vc_dispmanx_resource_write_data( dispmanxresource_amigafb_2, VC_IMAGE_RGB565, gfxvidinfo.width * 2, gfxvidinfo.bufmem, &blit_rect ); dispmanxupdate = vc_dispmanx_update_start( 10 ); vc_dispmanx_element_change_source(dispmanxupdate,dispmanxelement,dispmanxresource_amigafb_2); vc_dispmanx_update_submit(dispmanxupdate,vsync_callback,NULL); } last_synctime = read_processor_time(); if(last_synctime - next_synctime > time_per_frame - 1000) adjust_idletime(0); else adjust_idletime(next_synctime - start); if(last_synctime - next_synctime > time_per_frame - 5000) next_synctime = last_synctime + time_per_frame * (1 + currprefs.gfx_framerate); else next_synctime = next_synctime + time_per_frame * (1 + currprefs.gfx_framerate); init_row_map(); }
void flush_screen () { if (show_inputmode) inputmode_redraw(); if (savestate_state == STATE_DOSAVE) { if(delay_savestate_frame > 0) --delay_savestate_frame; else { CreateScreenshot(); save_thumb(screenshot_filename); savestate_state = 0; } } unsigned long start = read_processor_time(); if(start < next_synctime && next_synctime - start > time_per_frame - 1000) usleep((next_synctime - start) - 750); SDL_Flip(prSDLScreen); last_synctime = read_processor_time(); if(!screen_is_picasso) gfxvidinfo.bufmem = (uae_u8 *)prSDLScreen->pixels; if(last_synctime - next_synctime > time_per_frame - 1000) adjust_idletime(0); else adjust_idletime(next_synctime - start); if(last_synctime - next_synctime > time_per_frame - 5000) next_synctime = last_synctime + time_per_frame * (1 + currprefs.gfx_framerate); else next_synctime = next_synctime + time_per_frame * (1 + currprefs.gfx_framerate); init_row_map(); if(stylusClickOverride) { justClicked = 0; mouseMoving = 0; } else { if(justClicked) { buttonstate[0] = 0; buttonstate[2] = 0; justClicked = 0; } if(mouseMoving) { if(fcounter >= currprefs.pandora_tapDelay) { if(doStylusRightClick) { buttonstate[2] = 1; } else { buttonstate[0] = 1; mouseMoving = 0; justClicked = 1; fcounter = 0; } } fcounter++; } } }