From b7deb632513795e495e9a3aa76a9400fef4de364 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 5 Feb 2021 22:49:06 +0200 Subject: Experimenting with an iOS build iPlatformApple applies to both macOS and iOS. Added iPlatformAppleDesktop and iPlatformAppleMobile to make a distinction between the two. IssueID #96 --- src/ui/window.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ui/window.c') diff --git a/src/ui/window.c b/src/ui/window.c index b198dd15..5c7fcaab 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -41,7 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if defined (iPlatformMsys) # include "../win32.h" #endif -#if defined (iPlatformApple) && !defined (iPlatformIOS) +#if defined (iPlatformAppleDesktop) # include "macos.h" #endif @@ -92,7 +92,7 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { return iFalse; } -#if defined (iPlatformApple) +#if defined (iPlatformAppleDesktop) # define iHaveNativeMenus #endif @@ -724,8 +724,10 @@ void init_Window(iWindow *d, iRect rect) { d->isMouseInside = iTrue; d->focusGainedAt = 0; uint32_t flags = 0; -#if defined (iPlatformApple) +#if defined (iPlatformAppleDesktop) SDL_SetHint(SDL_HINT_RENDER_DRIVER, shouldDefaultToMetalRenderer_MacOS() ? "metal" : "opengl"); +#elif defined (iPlatformAppleMobile) + SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal"); #else flags |= SDL_WINDOW_OPENGL; #endif -- cgit v1.2.3