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 (void) #endif { uae4all_prof_start(13); #if defined(USE_RASTER_DRAW) && defined(DEBUG_GFX) dbgf("Function: flush_block %d %d\n", ystart, ystop); #endif #ifdef SCALING unsigned x,y,n,m; unsigned short *gfx_mem_p, *gfx_mem_line; unsigned short *surface_p, *surface_line; unsigned width_px = (prSDLScreen->pitch) / (prSDLScreen->format->BytesPerPixel); #endif #ifndef DINGOO #ifndef DREAMCAST if (SDL_MUSTLOCK(prSDLScreen)) SDL_UnlockSurface (prSDLScreen); #endif #ifdef SCALING #if !defined(DREAMCAST) && !defined(DINGOO) if (SDL_MUSTLOCK(prSDLScreen)) SDL_LockSurface(prSDLScreen); #endif surface_line = (uae_u16 *)prSDLScreen->pixels; gfx_mem_p = (uae_u16 *)gfx_mem; for(y = 0; y < current_height; y++) { gfx_mem_line = gfx_mem_p; for(n = 0; n < uae4all_scalefactor; n++) { gfx_mem_p = gfx_mem_line; surface_p = surface_line; surface_line += width_px; for(x = 0; x < current_width; x++) { for(m = 0; m < uae4all_scalefactor; m++) { *surface_p = *gfx_mem_p; surface_p++; } gfx_mem_p++; } } } #if !defined(DREAMCAST) && !defined(DINGOO) if (SDL_MUSTLOCK(prSDLScreen)) SDL_UnlockSurface(prSDLScreen); #endif #endif #ifndef DOUBLEBUFFER #ifdef USE_RASTER_DRAW SDL_UpdateRect(prSDLScreen, 0, ystart, current_width, ystop-ystart+1); #else #ifdef SCALING SDL_UpdateRect(prSDLScreen, 0, 0, uae4all_scalefactor*320, uae4all_scalefactor*240); #else SDL_UpdateRect(prSDLScreen, 0, 0, 320, 240); #endif #endif #endif #endif #ifdef USE_RASTER_DRAW if (drawfinished) { drawfinished=0; #endif if (show_message) { show_message--; if (!show_message) { notice_screen_contents_lost(); } else { _write_text_inv_n(prSDLScreen,0,29,30,show_message_str); } } if (emulated_mouse) vkbd_mouse(); if (vkbd_mode) vkbd_key=vkbd_process(); #if defined(DOUBLEBUFFER) || defined(DINGOO) SDL_Flip(prSDLScreen); #endif #ifdef USE_RASTER_DRAW } #endif #if !defined(DREAMCAST) && !defined(DINGOO) if (SDL_MUSTLOCK(prSDLScreen)) SDL_LockSurface (prSDLScreen); #endif uae4all_prof_end(13); }