Move GPU_Flip calls into CVideo::flip().
This commit is contained in:
parent
7f6e1e53b2
commit
ab9835efca
3 changed files with 9 additions and 5 deletions
|
@ -234,7 +234,7 @@ void loadscreen::draw_screen(const std::string &text)
|
|||
GPU_FreeImage(img);
|
||||
}
|
||||
|
||||
GPU_Flip(get_render_target());
|
||||
screen_.flip();
|
||||
#else
|
||||
surface gdis = screen_.getSurface();
|
||||
SDL_Rect area;
|
||||
|
|
|
@ -357,7 +357,7 @@ bool part_ui::render_floating_images()
|
|||
|
||||
if(!ri.image.null()) {
|
||||
ri.image.draw(*target, ri.rect.x, ri.rect.y);
|
||||
GPU_Flip(target);
|
||||
video_.flip();
|
||||
}
|
||||
|
||||
if (!skip_)
|
||||
|
@ -644,7 +644,7 @@ void part_ui::render_story_box()
|
|||
|
||||
const std::string& storytxt = p_.text();
|
||||
if(storytxt.empty()) {
|
||||
GPU_Flip(target);
|
||||
video_.flip();
|
||||
wait_for_input();
|
||||
return;
|
||||
}
|
||||
|
@ -735,7 +735,7 @@ void part_ui::render_story_box()
|
|||
dstrect.y = fix_text_y + scan.y + storybox_padding;
|
||||
txttxt.set_clip(scan);
|
||||
txttxt.draw(*target, dstrect.x, dstrect.y);
|
||||
GPU_Flip(target);
|
||||
video_.flip();
|
||||
++scan.y;
|
||||
}
|
||||
else skip_ = true;
|
||||
|
|
|
@ -510,7 +510,10 @@ void CVideo::flip()
|
|||
{
|
||||
if(fake_screen_)
|
||||
return;
|
||||
|
||||
#ifdef SDL_GPU
|
||||
assert(render_target);
|
||||
GPU_Flip(render_target);
|
||||
#else
|
||||
#if !SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
if(update_all) {
|
||||
::SDL_Flip(frameBuffer);
|
||||
|
@ -526,6 +529,7 @@ void CVideo::flip()
|
|||
assert(window);
|
||||
window->render();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void CVideo::lock_updates(bool value)
|
||||
|
|
Loading…
Add table
Reference in a new issue