diff --git a/src/posix/cocoa/i_common.h b/src/posix/cocoa/i_common.h index dc6bea2abe..09281713f3 100644 --- a/src/posix/cocoa/i_common.h +++ b/src/posix/cocoa/i_common.h @@ -31,7 +31,10 @@ ** */ -#include +#import +#import +#import +#import inline bool I_IsHiDPISupported() diff --git a/src/posix/cocoa/i_input.mm b/src/posix/cocoa/i_input.mm index 3abea1cb2b..ad2a3d1bd7 100644 --- a/src/posix/cocoa/i_input.mm +++ b/src/posix/cocoa/i_input.mm @@ -31,8 +31,12 @@ ** */ -#include -#include +#import +#import +#import + +// Avoid collision between DObject class and Objective-C +#define Class ObjectClass #include "c_console.h" #include "c_cvars.h" @@ -47,6 +51,8 @@ #include "i_common.h" #include "i_rbopts.h" +#undef Class + EXTERN_CVAR(Int, m_use_mouse) diff --git a/src/posix/cocoa/i_main.mm b/src/posix/cocoa/i_main.mm index 8277e587b6..f7f7321240 100644 --- a/src/posix/cocoa/i_main.mm +++ b/src/posix/cocoa/i_main.mm @@ -33,8 +33,11 @@ #include -#include -#include +#import +#import + +// Avoid collision between DObject class and Objective-C +#define Class ObjectClass #include "c_console.h" #include "c_cvars.h" @@ -50,6 +53,8 @@ #include "i_osversion.h" #include "i_rbopts.h" +#undef Class + #define ZD_UNUSED(VARIABLE) ((void)(VARIABLE)) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 61e1602252..0a872e88eb 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -31,16 +31,17 @@ ** */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#import +#import +#import +#import +#import +#import +#import +#import + +// Avoid collision between DObject class and Objective-C +#define Class ObjectClass #include "bitmap.h" #include "c_dispatch.h" @@ -61,6 +62,8 @@ #include "i_common.h" #include "i_rbopts.h" +#undef Class + EXTERN_CVAR(Bool, ticker ) EXTERN_CVAR(Bool, vid_vsync) @@ -215,7 +218,7 @@ public: virtual void SetVSync(bool vsync); private: - const size_t BYTES_PER_PIXEL = 4; + static const size_t BYTES_PER_PIXEL = 4; PalEntry m_palette[256]; bool m_needPaletteUpdate;