summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-04-25 15:36:06 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2012-08-16 22:29:42 +0200
commit13675fc7dc8e6864310b654f21085c76f457c43c (patch)
tree62398d01464b208bff164f8197ae9edcc322e69e
parentdcb90fde256152851c853dff31c4978e5cc17f7c (diff)
downloadmpv-13675fc7dc8e6864310b654f21085c76f457c43c.tar.bz2
mpv-13675fc7dc8e6864310b654f21085c76f457c43c.tar.xz
cleanup: osx_common: remove unused functions
Remove functions that aren't called anymore: * `osx_foreground_hack` was replaced by the NSApplication's activateIgnoringOtherApps: in cocoa_common. * Aspect ratio functions were not called by the "new" cocoa backend, since the corresponding menu item was deleted.
-rw-r--r--libvo/osx_common.c50
-rw-r--r--libvo/osx_common.h3
2 files changed, 0 insertions, 53 deletions
diff --git a/libvo/osx_common.c b/libvo/osx_common.c
index 155b8d02b3..428a492b7f 100644
--- a/libvo/osx_common.c
+++ b/libvo/osx_common.c
@@ -113,53 +113,3 @@ int convert_key(unsigned key, unsigned charcode)
return mpkey;
return charcode;
}
-
-static int our_aspect_change;
-static float old_movie_aspect;
-
-/**
- * Sends MPlayer a command to change aspect to the requested value.
- * @param new_aspect desired new aspect, < 0 means restore original.
- */
-void change_movie_aspect(struct vo *vo, float new_aspect)
-{
- char cmd_str[64];
- if (new_aspect < 0)
- new_aspect = old_movie_aspect;
- our_aspect_change = 1;
- snprintf(cmd_str, sizeof(cmd_str), "switch_ratio %f", new_aspect);
- mp_input_queue_cmd(vo->input_ctx, mp_input_parse_cmd(cmd_str));
-}
-
-/**
- * Call in config to save the original movie aspect.
- * This will ignore config calls caused by change_movie_aspect.
- */
-void config_movie_aspect(float config_aspect)
-{
- if (!our_aspect_change)
- old_movie_aspect = config_aspect;
- our_aspect_change = 0;
-}
-
-/** This chunk of code is heavily based off SDL_macosx.m from SDL.
- * The CPSEnableForegroundOperation that was here before is private
- * and should not be used.
- * Replaced by a call to the 10.3+ TransformProcessType.
- */
-void osx_foreground_hack(void)
-{
-#if !defined (CONFIG_MACOSX_FINDER) || !defined (CONFIG_SDL)
- ProcessSerialNumber myProc, frProc;
- Boolean sameProc;
-
- if (GetFrontProcess(&frProc) == noErr &&
- GetCurrentProcess(&myProc) == noErr) {
- if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc) {
- TransformProcessType(&myProc,
- kProcessTransformToForegroundApplication);
- }
- SetFrontProcess(&myProc);
- }
-#endif
-}
diff --git a/libvo/osx_common.h b/libvo/osx_common.h
index 43d9d07c99..c5e127345f 100644
--- a/libvo/osx_common.h
+++ b/libvo/osx_common.h
@@ -22,8 +22,5 @@
struct vo;
int convert_key(unsigned key, unsigned charcode);
-void change_movie_aspect(struct vo *vo, float new_aspect);
-void config_movie_aspect(float config_aspect);
-void osx_foreground_hack(void);
#endif /* MPLAYER_OSX_COMMON_H */