From 09a1211c9647fe2df299849aa24fcf590b41ba2f Mon Sep 17 00:00:00 2001 From: Dale Stammen Date: Wed, 26 Aug 2015 09:47:59 -0700 Subject: [PATCH] use isWindowsPhone() to check for Windows Phone platform --- cocos/platform/winrt/CCApplication.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cocos/platform/winrt/CCApplication.cpp b/cocos/platform/winrt/CCApplication.cpp index d6cb848e7f..02dfc998ce 100644 --- a/cocos/platform/winrt/CCApplication.cpp +++ b/cocos/platform/winrt/CCApplication.cpp @@ -214,11 +214,14 @@ LanguageType Application::getCurrentLanguage() Application::Platform Application::getTargetPlatform() { -#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) - return Platform::OS_WP8; -#else - return Platform::OS_WINRT; -#endif + if (isWindowsPhone()) + { + return Platform::OS_WP8; + } + else + { + return Platform::OS_WINRT; + } } bool Application::openURL(const std::string &url)