diff options
Diffstat (limited to 'platform/iphone/gl_view.mm')
-rw-r--r-- | platform/iphone/gl_view.mm | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm index 478a3125af..5b4d1f8226 100644 --- a/platform/iphone/gl_view.mm +++ b/platform/iphone/gl_view.mm @@ -53,7 +53,6 @@ static GLView *_instance = NULL; static bool video_found_error = false; static bool video_playing = false; -static float video_previous_volume = 0.0f; static CMTime video_current_time; void _show_keyboard(String); @@ -85,7 +84,8 @@ Rect2 _get_ios_window_safe_area(float p_window_width, float p_window_height) { } ERR_FAIL_COND_V(insets.left < 0 || insets.top < 0 || insets.right < 0 || insets.bottom < 0, Rect2(0, 0, p_window_width, p_window_height)); - return Rect2(insets.left, insets.top, p_window_width - insets.right - insets.left, p_window_height - insets.bottom - insets.top); + UIEdgeInsets window_insets = UIEdgeInsetsMake(_points_to_pixels(insets.top), _points_to_pixels(insets.left), _points_to_pixels(insets.bottom), _points_to_pixels(insets.right)); + return Rect2(window_insets.left, window_insets.top, p_window_width - window_insets.right - window_insets.left, p_window_height - window_insets.bottom - window_insets.top); } bool _play_video(String p_path, float p_volume, String p_audio_track, String p_subtitle_track) { @@ -248,16 +248,6 @@ static int remove_touch(UITouch *p_touch) { return remaining; }; -static int get_first_id(UITouch *p_touch) { - - for (int i = 0; i < max_touches; i++) { - - if (touches[i] != NULL) - return i; - }; - return -1; -}; - static void clear_touches() { for (int i = 0; i < max_touches; i++) { @@ -751,7 +741,6 @@ static void clear_touches() { [_instance.moviePlayerController stop]; [_instance.moviePlayerController.view removeFromSuperview]; - //[[MPMusicPlayerController applicationMusicPlayer] setVolume: video_previous_volume]; video_playing = false; } */ |