summaryrefslogtreecommitdiff
path: root/platform/iphone
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-05-24 01:35:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-05-24 01:35:47 -0300
commit1cad087969efefa401a11051343cd0689f660770 (patch)
tree1595dd049bdb7289752012dca4398b2251fb08fa /platform/iphone
parentf9ff086235cd4ff406b136f62fff77b85c0873f9 (diff)
Making Godot Easier to Use..
-=-=-=-=-=-=-=-=-=-=-=-=-=-= -Auto indenter in code editor, this makes it much easier to paste external code. -Zoom in 2D viewport now uses the mouse pointer as reference. -Obscure hack to see where code/line of GDScript in C++ backtrace. -Fixed a bug where keys would get stuck on X11 if pressed simultaneously -Added Api on IP singleton to request local IPs. -Premultiplied alpha support when importing texture, editing PNGs and as a blend mode.
Diffstat (limited to 'platform/iphone')
-rw-r--r--platform/iphone/detect.py6
-rwxr-xr-xplatform/iphone/gl_view.mm13
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