Skip to content

Commit

Permalink
vulkan/context: trigger VO_EVENT_RESIZE on layer change
Browse files Browse the repository at this point in the history
  • Loading branch information
sixones committed Mar 8, 2024
1 parent fc3dd44 commit 0097137
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion video/out/vulkan/context_moltenvk.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "common.h"
#include "context.h"
#include "video/out/vo.h"
#include "utils.h"

static bool moltenvk_reconfig(struct ra_ctx *ctx);
Expand All @@ -40,7 +41,10 @@ - (id)initWithContext: (struct ra_ctx*) ctx

- (void)layoutSublayersOfLayer: (CALayer*) layer
{
moltenvk_reconfig(_ra_ctx);
CGSize s = layer.drawableSize;
_ra_ctx->vo->dwidth = s.width;
_ra_ctx->vo->dheight = s.height;
vo_event(_ra_ctx->vo, VO_EVENT_RESIZE | VO_EVENT_EXPOSE);
}

@end
Expand Down

0 comments on commit 0097137

Please sign in to comment.