Skip to content

Commit b70380c

Browse files
committed
Fix warnings
1 parent 97827c1 commit b70380c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

gfx/drivers_context/cocoa_gl_ctx.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,10 @@ static bool cocoa_gl_gfx_ctx_set_video_mode(void *data,
380380
CocoaView *g_view = (CocoaView*)nsview_get_ptr();
381381
#endif
382382
cocoa_ctx_data_t *cocoa_ctx = (cocoa_ctx_data_t*)data;
383+
#ifndef HAVE_COCOA_METAL
383384
static bool
384385
has_went_fullscreen = false;
386+
#endif
385387
cocoa_ctx->width = width;
386388
cocoa_ctx->height = height;
387389

@@ -486,6 +488,7 @@ static bool cocoa_gl_gfx_ctx_set_video_mode(void *data,
486488
mode.fullscreen = fullscreen;
487489
[apple_platform setVideoMode:mode];
488490
cocoa_show_mouse(data, !fullscreen);
491+
has_went_fullscreen = fullscreen;
489492
#else
490493
/* Hand-rolled fullscreen for the non-Metal path.
491494
*
@@ -607,8 +610,6 @@ static bool cocoa_gl_gfx_ctx_set_video_mode(void *data,
607610
}
608611
#endif
609612

610-
has_went_fullscreen = fullscreen;
611-
612613
return true;
613614
}
614615

gfx/drivers_context/cocoa_vk_ctx.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static void cocoa_vk_gfx_ctx_swap_interval(void *data, int i)
182182
unsigned interval = (unsigned)i;
183183
cocoa_vk_ctx_data_t *cocoa_ctx = (cocoa_vk_ctx_data_t*)data;
184184

185-
if (cocoa_ctx->swap_interval != interval)
185+
if (cocoa_ctx->swap_interval != (int)interval)
186186
{
187187
cocoa_ctx->swap_interval = interval;
188188
if (cocoa_ctx->vk.swapchain)

0 commit comments

Comments
 (0)