From 20f34d89f0997a2b880742d84a64931aff447312 Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Sun, 24 Nov 2013 09:54:59 +0000 Subject: [PATCH] ios stuff --- include/Utils/IosApi/IosApi.h | 2 ++ src/Utils/IosApi/IosApi.mm | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/Utils/IosApi/IosApi.h b/include/Utils/IosApi/IosApi.h index 3290e38..9bb0fb8 100644 --- a/include/Utils/IosApi/IosApi.h +++ b/include/Utils/IosApi/IosApi.h @@ -25,5 +25,7 @@ void IosSwitchToScreen(); void ShowKeyboard(std::string text); void HideKeyboard(); + + bool IsIpad(); } //namespace SE diff --git a/src/Utils/IosApi/IosApi.mm b/src/Utils/IosApi/IosApi.mm index 1bb16d7..8455bc2 100644 --- a/src/Utils/IosApi/IosApi.mm +++ b/src/Utils/IosApi/IosApi.mm @@ -82,6 +82,14 @@ void SetKeyboardText(const char* newText) //GuiManagerSetKeyboardText(newText); //NSLog(@"text: %s", newText); } + + bool IsIpad() +{ + if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ) + { + return YES; /* Device is iPad */ + } +} } //namespace SE