Have GetFramebufferDimensions return the backbuffer size for null in all backends.

This commit is contained in:
Henrik Rydgård 2017-10-20 11:11:04 +02:00
parent b886efe8f5
commit 21d3c54401
2 changed files with 14 additions and 4 deletions

View file

@ -1118,8 +1118,13 @@ void D3D9Context::BindFramebufferAsTexture(Framebuffer *fbo, int binding, FBChan
void D3D9Context::GetFramebufferDimensions(Framebuffer *fbo, int *w, int *h) {
D3D9Framebuffer *fb = (D3D9Framebuffer *)fbo;
*w = fb->width;
*h = fb->height;
if (fb) {
*w = fb->width;
*h = fb->height;
} else {
*w = targetWidth_;
*h = targetHeight_;
}
}
bool D3D9Context::BlitFramebuffer(Framebuffer *srcfb, int srcX1, int srcY1, int srcX2, int srcY2, Framebuffer *dstfb, int dstX1, int dstY1, int dstX2, int dstY2, int channelBits, FBBlitFilter filter) {

View file

@ -2029,8 +2029,13 @@ uintptr_t VKContext::GetFramebufferAPITexture(Framebuffer *fbo, int channelBit,
void VKContext::GetFramebufferDimensions(Framebuffer *fbo, int *w, int *h) {
VKFramebuffer *fb = (VKFramebuffer *)fbo;
*w = fb->width;
*h = fb->height;
if (fb) {
*w = fb->width;
*h = fb->height;
} else {
*w = vulkan_->GetWidth();
*h = vulkan_->GetHeight();
}
}
void VKContext::HandleEvent(Event ev, int width, int height, void *param1, void *param2) {