diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-19 00:04:43 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-19 00:04:43 +0200 |
commit | 79e1aa7cc7a9ac695c3af361bca72013ef272885 (patch) | |
tree | cc52764dfa4fab2cfc74c6aee5d71b27edbf014b /libvo/vo_macosx.m | |
parent | 3ba97da297e1e1a5ca9dabdda60cc6a62f77affc (diff) | |
parent | 39cb032fd184a62416f1e62d26e05576cfd8dbe4 (diff) | |
download | mpv-79e1aa7cc7a9ac695c3af361bca72013ef272885.tar.bz2 mpv-79e1aa7cc7a9ac695c3af361bca72013ef272885.tar.xz |
Merge svn changes up to r28341
Conflicts:
configure
libmpcodecs/native/rtjpegn.c
Diffstat (limited to 'libvo/vo_macosx.m')
-rw-r--r-- | libvo/vo_macosx.m | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index dcce691354..38a9c9dbe9 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -50,8 +50,7 @@ BOOL shared_buffer = false; static char *buffer_name; //Screen -int screen_id; -BOOL screen_force; +int screen_id = -1; NSRect screen_frame; NSScreen *screen_handle; NSArray *screen_array; @@ -110,13 +109,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ screen_array = [NSScreen screens]; if(screen_id < [screen_array count]) { - screen_handle = [screen_array objectAtIndex:screen_id]; + screen_handle = [screen_array objectAtIndex:(screen_id < 0 ? 0 : screen_id)]; } else { mp_msg(MSGT_VO, MSGL_FATAL, "Get device error: Device ID %d do not exist, falling back to main device.\n", screen_id); screen_handle = [screen_array objectAtIndex:0]; - screen_id = 0; + screen_id = -1; } screen_frame = [screen_handle frame]; vo_screenwidth = screen_frame.size.width; @@ -324,7 +323,7 @@ static void uninit(void) } static opt_t subopts[] = { -{"device_id", OPT_ARG_INT, &screen_id, (opt_test_f)int_non_neg}, +{"device_id", OPT_ARG_INT, &screen_id, NULL}, {"shared_buffer", OPT_ARG_BOOL, &shared_buffer, NULL}, {"buffer_name", OPT_ARG_MSTRZ,&buffer_name, NULL}, {NULL} @@ -334,7 +333,7 @@ static int preinit(const char *arg) { // set defaults - screen_id = 0; + screen_id = -1; shared_buffer = false; buffer_name = NULL; @@ -858,7 +857,7 @@ static int control(uint32_t request, void *data) } old_frame = [window frame]; //save main window size & position - if(screen_force) + if(screen_id >= 0) screen_frame = [screen_handle frame]; else { screen_frame = [[window screen] frame]; |