changeset 36274:ba5fa3e71247

Keep paused mode when changing the aspect ratio. Patch by Hans-Dieter Kosch, hdkosch kabelbw de.
author ib
date Sat, 27 Jul 2013 23:48:16 +0000
parents 55cac32d68c2
children 26e1408891f8
files gui/ui/actions.c gui/win32/gui.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/actions.c	Sat Jul 27 23:07:46 2013 +0000
+++ b/gui/ui/actions.c	Sat Jul 27 23:48:16 2013 +0000
@@ -93,7 +93,7 @@
     int iparam     = (int)param, osd;
     mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext);
     float aspect;
-    char cmd[32];
+    char cmd[40];
 
     switch (ev) {
 /* user events */
@@ -443,7 +443,7 @@
             aspect = -1;
         }
 
-        snprintf(cmd, sizeof(cmd), "switch_ratio %f", aspect);
+        snprintf(cmd, sizeof(cmd), "pausing_keep switch_ratio %f", aspect);
         mp_input_queue_cmd(mp_input_parse_cmd(cmd));
 
         break;
--- a/gui/win32/gui.c	Sat Jul 27 23:07:46 2013 +0000
+++ b/gui/win32/gui.c	Sat Jul 27 23:48:16 2013 +0000
@@ -354,7 +354,7 @@
 static LRESULT CALLBACK VideoProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
     float aspect;
-    char cmd[32];
+    char cmd[40];
     gui_t *gui = (gui_t *) GetWindowLongPtr(hWnd, GWLP_USERDATA);
     if (gui && (gui->videowindow != hWnd)) return FALSE;
 
@@ -488,7 +488,7 @@
                             aspect = -1;
                             break;
                     }
-                    snprintf(cmd, sizeof(cmd), "switch_ratio %f", aspect);
+                    snprintf(cmd, sizeof(cmd), "pausing_keep switch_ratio %f", aspect);
                     mp_input_queue_cmd(mp_input_parse_cmd(cmd));
                     break;
                 case IDSUB_TOGGLE: