diff options
Diffstat (limited to 'platform/iphone')
-rw-r--r-- | platform/iphone/detect.py | 6 | ||||
-rwxr-xr-x | platform/iphone/gl_view.mm | 13 |
2 files changed, 14 insertions, 5 deletions
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index a02891e817..ec6e4c98f1 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -21,7 +21,8 @@ def get_opts(): return [ ('IPHONEPLATFORM', 'name of the iphone platform', 'iPhoneOS'), ('IPHONEPATH', 'the path to iphone toolchain', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'), - ('IPHONESDK', 'path to the iphone SDK', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/'), + ('IOS_SDK_VERSION', 'The SDK version', 'iPhoneOS7.0'), + ('IPHONESDK', 'path to the iphone SDK', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/${IOS_SDK_VERSION}.sdk/'), ('game_center', 'Support for game center', 'yes'), ('store_kit', 'Support for in-app store', 'yes'), ('ios_gles22_override', 'Force GLES2.0 on iOS', 'yes'), @@ -37,6 +38,7 @@ def get_flags(): ('tools', 'yes'), ('nedmalloc', 'no'), ('webp', 'yes'), + ('openssl','builtin'), #use builtin openssl ] @@ -81,7 +83,7 @@ def configure(env): '-framework', 'AudioToolbox', '-framework', 'SystemConfiguration', '-framework', 'Security', - '-framework', 'AdSupport', + #'-framework', 'AdSupport', '-framework', 'MediaPlayer', ]) diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm index c482c36a30..500c7c7174 100755 --- a/platform/iphone/gl_view.mm +++ b/platform/iphone/gl_view.mm @@ -50,6 +50,7 @@ static String keyboard_text; static GLView* _instance = NULL; static bool video_found_error = false; +static bool video_playing = false; static float video_previous_volume = 0.0f; void _show_keyboard(String p_existing) { @@ -91,24 +92,29 @@ bool _play_video(String p_path, float p_volume) { [_instance addSubview:_instance.moviePlayerController.view]; [_instance.moviePlayerController play]; + video_playing = true; + return true; } bool _is_video_playing() { //NSInteger playback_state = _instance.moviePlayerController.playbackState; - if (video_found_error) - return false; - return (_instance.moviePlayerController.playbackState == MPMoviePlaybackStatePlaying); + return video_playing || _instance.moviePlayerController.playbackState == MPMoviePlaybackStatePlaying; + //if (video_found_error) + // return false; + //return (_instance.moviePlayerController.playbackState == MPMoviePlaybackStatePlaying); } void _pause_video() { [_instance.moviePlayerController pause]; + video_playing = false; } void _stop_video() { [_instance.moviePlayerController stop]; [_instance.moviePlayerController.view removeFromSuperview]; [[MPMusicPlayerController applicationMusicPlayer] setVolume: video_previous_volume]; + video_playing = false; } @implementation GLView @@ -549,6 +555,7 @@ static void clear_touches() { [_instance.moviePlayerController.view removeFromSuperview]; [[MPMusicPlayerController applicationMusicPlayer] setVolume: video_previous_volume]; + video_playing = false; } @end |