diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-05 22:49:06 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-05 22:49:06 +0200 |
commit | b7deb632513795e495e9a3aa76a9400fef4de364 (patch) | |
tree | f57006f6fee9b79aea3182df5f0c3b28e9fc71eb /src/ui/window.c | |
parent | 52f3c7e158ee9436ee82f602ee9a6212dd54b776 (diff) |
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
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 8 |
1 files changed, 5 insertions, 3 deletions
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. */ | |||
41 | #if defined (iPlatformMsys) | 41 | #if defined (iPlatformMsys) |
42 | # include "../win32.h" | 42 | # include "../win32.h" |
43 | #endif | 43 | #endif |
44 | #if defined (iPlatformApple) && !defined (iPlatformIOS) | 44 | #if defined (iPlatformAppleDesktop) |
45 | # include "macos.h" | 45 | # include "macos.h" |
46 | #endif | 46 | #endif |
47 | 47 | ||
@@ -92,7 +92,7 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { | |||
92 | return iFalse; | 92 | return iFalse; |
93 | } | 93 | } |
94 | 94 | ||
95 | #if defined (iPlatformApple) | 95 | #if defined (iPlatformAppleDesktop) |
96 | # define iHaveNativeMenus | 96 | # define iHaveNativeMenus |
97 | #endif | 97 | #endif |
98 | 98 | ||
@@ -724,8 +724,10 @@ void init_Window(iWindow *d, iRect rect) { | |||
724 | d->isMouseInside = iTrue; | 724 | d->isMouseInside = iTrue; |
725 | d->focusGainedAt = 0; | 725 | d->focusGainedAt = 0; |
726 | uint32_t flags = 0; | 726 | uint32_t flags = 0; |
727 | #if defined (iPlatformApple) | 727 | #if defined (iPlatformAppleDesktop) |
728 | SDL_SetHint(SDL_HINT_RENDER_DRIVER, shouldDefaultToMetalRenderer_MacOS() ? "metal" : "opengl"); | 728 | SDL_SetHint(SDL_HINT_RENDER_DRIVER, shouldDefaultToMetalRenderer_MacOS() ? "metal" : "opengl"); |
729 | #elif defined (iPlatformAppleMobile) | ||
730 | SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal"); | ||
729 | #else | 731 | #else |
730 | flags |= SDL_WINDOW_OPENGL; | 732 | flags |= SDL_WINDOW_OPENGL; |
731 | #endif | 733 | #endif |