Skip to content

Commit

Permalink
fixup! fixup! vulkan/context: resize context when layout is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
sixones committed Feb 13, 2024
1 parent f8fef2e commit f9cca3a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions video/out/vulkan/context_moltenvk.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
#include "utils.h"

@interface MetalLayerDelegate : NSObject<CALayerDelegate>
@property (nonatomic, weak) ra_ctx *ra_ctx;
- (id) initWithContext: (ra_ctx*) cxt;
@property (nonatomic) struct ra_ctx *ra_ctx;
- (id) initWithContext: (struct ra_ctx*) cxt;
@end

@implementation MetalLayerDelegate : NSObject

- (id)initWithContext: (ra_ctx*) ctx
- (id)initWithContext: (struct ra_ctx*) ctx
{
_ra_ctx = ctx;
return self;
Expand All @@ -52,6 +52,8 @@ - (void)layoutSublayers: (CALayer*) layer
static void moltenvk_uninit(struct ra_ctx *ctx)
{
struct priv *p = ctx->priv;
p->layer.delegate = nil;
p->delegate.ra_ctx = nil;
p->delegate = nil;
ra_vk_ctx_uninit(ctx);
mpvk_uninit(&p->vk);
Expand Down

0 comments on commit f9cca3a

Please sign in to comment.