Fix issue with taking screenshots from an FBO

This commit is contained in:
rdb 2017-02-17 12:57:34 +01:00
parent 8c914a2855
commit 78e4c71202
2 changed files with 9 additions and 0 deletions

View File

@ -491,6 +491,12 @@ get_screenshot() {
return NULL;
}
{
// Make sure that the correct viewport is active.
DisplayRegionPipelineReader dr_reader(this, current_thread);
gsg->prepare_display_region(&dr_reader);
}
PT(Texture) tex = new Texture;
RenderBuffer buffer = gsg->get_render_buffer(get_screenshot_buffer_type(),

View File

@ -269,6 +269,9 @@ begin_frame(FrameMode mode, Thread *current_thread) {
}
}
#endif
} else if (mode == FM_refresh) {
// Just bind the FBO.
rebuild_bitplanes();
}
_gsg->set_current_properties(&get_fb_properties());