summaryrefslogtreecommitdiffstats
path: root/platform/iphone/gl_view.mm
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/gl_view.mm
parentf9ff086235cd4ff406b136f62fff77b85c0873f9 (diff)
downloadredot-engine-1cad087969efefa401a11051343cd0689f660770.tar.gz
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/gl_view.mm')
-rwxr-xr-xplatform/iphone/gl_view.mm13
1 files changed, 10 insertions, 3 deletions
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