From d8e3d60e859939f09169b2142977deee1a42e5ec Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 5 May 2020 10:55:35 +0300 Subject: [PATCH] - fixed compilation of Cocoa backend --- source/common/utility/findfile.cpp | 4 ---- source/platform/posix/cocoa/i_main.mm | 2 +- source/platform/posix/cocoa/st_console.mm | 2 +- source/platform/posix/osx/iwadpicker_cocoa.mm | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/source/common/utility/findfile.cpp b/source/common/utility/findfile.cpp index 1adf08896..2ab573399 100644 --- a/source/common/utility/findfile.cpp +++ b/source/common/utility/findfile.cpp @@ -45,11 +45,7 @@ static const char *pattern; -#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < 1080 -static int matchfile(struct dirent *ent) -#else static int matchfile(const struct dirent *ent) -#endif { return fnmatch(pattern, ent->d_name, FNM_NOESCAPE) == 0; } diff --git a/source/platform/posix/cocoa/i_main.mm b/source/platform/posix/cocoa/i_main.mm index 7114d34ce..b70534cc7 100644 --- a/source/platform/posix/cocoa/i_main.mm +++ b/source/platform/posix/cocoa/i_main.mm @@ -350,7 +350,7 @@ extern bool AppActive; - (void)sendExitEvent:(id)sender { - throw ExitEvent(0); + throw CExitEvent(0); } @end diff --git a/source/platform/posix/cocoa/st_console.mm b/source/platform/posix/cocoa/st_console.mm index fa55e36cb..89e5a1470 100644 --- a/source/platform/posix/cocoa/st_console.mm +++ b/source/platform/posix/cocoa/st_console.mm @@ -36,7 +36,6 @@ #include "st_console.h" #include "v_text.h" #include "version.h" -#include "i_time.h" #include "palentry.h" #include "v_video.h" #include "v_font.h" @@ -195,6 +194,7 @@ struct TimedUpdater { explicit TimedUpdater(const Function& function) { + extern uint64_t I_msTime(); const unsigned int currentTime = I_msTime(); if (currentTime - m_previousTime > interval) diff --git a/source/platform/posix/osx/iwadpicker_cocoa.mm b/source/platform/posix/osx/iwadpicker_cocoa.mm index beeb28d5d..0ef86f2e1 100644 --- a/source/platform/posix/osx/iwadpicker_cocoa.mm +++ b/source/platform/posix/osx/iwadpicker_cocoa.mm @@ -360,7 +360,7 @@ static NSArray* GetKnownExtensions() if ( @selector(terminate:) == [menuItem action] ) { - throw ExitEvent(0); + throw CExitEvent(0); } }