Index: gui/app/gui.h
===================================================================
--- gui/app/gui.h	(revision 37113)
+++ gui/app/gui.h	(working copy)
@@ -48,9 +48,12 @@
 #define isInside(x, y, tx, ty, bx, by) ((x) > (tx) && (y) > (ty) && (x) < (bx) && (y) < (by))
 
 /// Check whether #guiItem @a item has a button (and thus a pressed state).
-#define hasButton(item) (item.type == itButton || item.type == itHPotmeter || item.type == itVPotmeter)
+#define hasButton(item) (item.type == itButton || item.type == itHPotmeter || item.type == itVPotmeter || item.type == itRPotmeter)
 
 /// Check whether #guiItem @a item utilizes member 'value'
-#define hasValue(item) (item.type == itHPotmeter || item.type == itVPotmeter || item.type == itPimage)
+#define hasValue(item) (item.type == itHPotmeter || item.type == itVPotmeter || item.type == itRPotmeter || item.type == itPimage)
 
+/// Stop gap for the itRPotmeter to avoid ambiguity at the min./max. border on the circle
+#define RPOTMETER_STOP_GAP (1/60.0)
+
 #endif /* MPLAYER_GUI_GUI_H */
Index: gui/ui/main.c
===================================================================
--- gui/ui/main.c	(revision 37113)
+++ gui/ui/main.c	(working copy)
@@ -99,6 +99,9 @@
  static int     SelectedItem = -1;
         int     currentselected = -1;
 
+ static double  last_rpotmeter_angle;
+ static int     rpotmeter_stop;
+
  for ( i=0;i <= guiApp.IndexOfMainItems;i++ )
   if ( ( guiApp.mainItems[i].pressed != btnDisabled )&&
        ( isInside( X,Y,guiApp.mainItems[i].x,guiApp.mainItems[i].y,guiApp.mainItems[i].x+guiApp.mainItems[i].width,guiApp.mainItems[i].y+guiApp.mainItems[i].height ) ) )
@@ -134,10 +137,22 @@
                   { item->pressed=btnDisabled; }
                  break;
            }*/
+          switch( itemtype )
+           {
+            case itRPotmeter:
+                 {
+                   double dx = X - item->x - item->width / 2;
+                   double dy = Y - item->y - item->height / 2;
+
+                   last_rpotmeter_angle = (dx == 0 && dy == 0) ? 0 : (atan2(dx, -dy) + M_PI) / (2*M_PI);
+                   rpotmeter_stop = 0;
+                 }
+                 break;
+           }
           break;
    case wsRLMouseButton:
           boxMoved=False;
-          if ( SelectedItem != -1 )   // NOTE TO MYSELF: only if itButton, itHPotmeter or itVPotmeter
+          if ( SelectedItem != -1 )   // NOTE TO MYSELF: only if itButton, itHPotmeter, itVPotmeter or itRPotmeter
            {
             item=&guiApp.mainItems[SelectedItem];
             item->pressed=btnReleased;
@@ -153,6 +168,21 @@
 	    case itVPotmeter:
                  value=100.0 - 100.0 * ( Y - item->y ) / item->height;
                  break;
+	    case itRPotmeter:
+                 if (rpotmeter_stop) { itemtype=0; return; }
+                 {
+                   double dx = X - item->x - item->width / 2;
+                   double dy = Y - item->y - item->height / 2;
+                   double a;
+
+                   if ( dx == 0 && dy == 0 ) { itemtype=0; return; }
+                   // CW angle, 0..1, 0 at center/bottom
+                   a = (atan2(dx, -dy) + M_PI) / (2*M_PI);
+                   a = FFMAX( a, RPOTMETER_STOP_GAP );
+                   a = FFMIN( a, 1-RPOTMETER_STOP_GAP );
+                   value = ((a - RPOTMETER_STOP_GAP) / (1-2*RPOTMETER_STOP_GAP)) * 100.0;
+                 }
+                 break;
            }
           uiEvent( item->message,value );
           itemtype=0;
@@ -169,7 +199,7 @@
           if (currentselected != - 1)
            {
             item=&guiApp.mainItems[currentselected];
-            if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter ) )
+            if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itRPotmeter ) )
              {
               item->value+=value;
               uiEvent( item->message,item->value );
@@ -188,6 +218,26 @@
             case itPRMButton:
                  if (guiApp.menuIsPresent) guiApp.menuWindow.MouseHandler( 0,RX,RY,0,0 );
                  break;
+            case itRPotmeter:
+                 {
+                   double dx = X - item->x - item->width / 2;
+                   double dy = Y - item->y - item->height / 2;
+                   double a;
+
+                   if ( dx == 0 && dy == 0 ) break;
+                   // CW angle, 0..1, 0 at center/bottom
+                   a = (atan2(dx, -dy) + M_PI) / (2*M_PI);
+                   // Stop rotating when crossing 0 until crossing in opposite direction
+                   if (last_rpotmeter_angle < 0.25 && a > 0.75) rpotmeter_stop = rpotmeter_stop == 1 ? 0 : -1;
+                   if (last_rpotmeter_angle > 0.75 && a < 0.25) rpotmeter_stop = rpotmeter_stop == -1 ? 0 : 1;
+                   last_rpotmeter_angle = a;
+                   if (rpotmeter_stop < 0) a = 0.0;
+                   if (rpotmeter_stop > 0) a = 1.0;
+                   a = FFMAX( a, RPOTMETER_STOP_GAP );
+                   a = FFMIN( a, 1-RPOTMETER_STOP_GAP );
+                   item->value = ((a - RPOTMETER_STOP_GAP) / (1-2*RPOTMETER_STOP_GAP)) * 100.0;
+                 }
+                 goto potihandled;
             case itVPotmeter:
                  item->value=100.0 - 100.0 * ( Y - item->y ) / item->height;
                  goto potihandled;
Index: gui/ui/playbar.c
===================================================================
--- gui/ui/playbar.c	(revision 37113)
+++ gui/ui/playbar.c	(working copy)
@@ -127,6 +127,9 @@
  static int     SelectedItem = -1;
 	int     currentselected = -1;
 
+ static double  last_rpotmeter_angle;
+ static int     rpotmeter_stop;
+
  for ( i=0;i <= guiApp.IndexOfPlaybarItems;i++ )
    if ( ( guiApp.playbarItems[i].pressed != btnDisabled )&&
       ( isInside( X,Y,guiApp.playbarItems[i].x,guiApp.playbarItems[i].y,guiApp.playbarItems[i].x+guiApp.playbarItems[i].width,guiApp.playbarItems[i].y+guiApp.playbarItems[i].height ) ) )
@@ -162,10 +165,22 @@
 		 { item->pressed=btnDisabled; }
 	       break;
 	 }
+	switch( itemtype )
+	 {
+	  case itRPotmeter:
+	       {
+	         double dx = X - item->x - item->width / 2;
+	         double dy = Y - item->y - item->height / 2;
 
+	         last_rpotmeter_angle = (dx == 0 && dy == 0) ? 0 : (atan2(dx, -dy) + M_PI) / (2*M_PI);
+	         rpotmeter_stop = 0;
+	       }
+	       break;
+	 }
+
 	break;
    case wsRLMouseButton:
-        if ( SelectedItem != -1 )   // NOTE TO MYSELF: only if itButton, itHPotmeter or itVPotmeter
+        if ( SelectedItem != -1 )   // NOTE TO MYSELF: only if itButton, itHPotmeter, itVPotmeter or itRPotmeter
          {
           item=&guiApp.playbarItems[SelectedItem];
           item->pressed=btnReleased;
@@ -182,6 +197,21 @@
 	  case itVPotmeter:
 	       value=100.0 - 100.0 * ( Y - item->y ) / item->height;
 	       break;
+	  case itRPotmeter:
+	       if (rpotmeter_stop) { itemtype=0; return; }
+	       {
+	         double dx = X - item->x - item->width / 2;
+	         double dy = Y - item->y - item->height / 2;
+	         double a;
+
+	         if ( dx == 0 && dy == 0 ) { itemtype=0; return; }
+	         // CW angle, 0..1, 0 at center/bottom
+	         a = (atan2(dx, -dy) + M_PI) / (2*M_PI);
+	         a = FFMAX( a, RPOTMETER_STOP_GAP );
+	         a = FFMIN( a, 1-RPOTMETER_STOP_GAP );
+	         value = ((a - RPOTMETER_STOP_GAP) / (1-2*RPOTMETER_STOP_GAP)) * 100.0;
+	       }
+	       break;
 	 }
 	uiEvent( item->message,value );
 
@@ -194,7 +224,7 @@
         if (currentselected != - 1)
          {
           item=&guiApp.playbarItems[currentselected];
-          if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter ) )
+          if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itRPotmeter ) )
            {
             item->value+=value;
             uiEvent( item->message,item->value );
@@ -209,6 +239,26 @@
 	  case itPRMButton:
 	       if (guiApp.menuIsPresent) guiApp.menuWindow.MouseHandler( 0,RX,RY,0,0 );
 	       break;
+	  case itRPotmeter:
+	       {
+	         double dx = X - item->x - item->width / 2;
+	         double dy = Y - item->y - item->height / 2;
+	         double a;
+
+	         if ( dx == 0 && dy == 0 ) break;
+	         // CW angle, 0..1, 0 at center/bottom
+	         a = (atan2(dx, -dy) + M_PI) / (2*M_PI);
+	         // Stop rotating when crossing 0 until crossing in opposite direction
+	         if (last_rpotmeter_angle < 0.25 && a > 0.75) rpotmeter_stop = rpotmeter_stop == 1 ? 0 : -1;
+	         if (last_rpotmeter_angle > 0.75 && a < 0.25) rpotmeter_stop = rpotmeter_stop == -1 ? 0 : 1;
+	         last_rpotmeter_angle = a;
+	         if (rpotmeter_stop < 0) a = 0.0;
+	         if (rpotmeter_stop > 0) a = 1.0;
+	         a = FFMAX( a, RPOTMETER_STOP_GAP );
+	         a = FFMIN( a, 1-RPOTMETER_STOP_GAP );
+	         item->value = ((a - RPOTMETER_STOP_GAP) / (1-2*RPOTMETER_STOP_GAP)) * 100.0;
+	       }
+	       goto potihandled;
 	  case itVPotmeter:
 	       item->value=100.0 - 100.0 * ( Y - item->y ) / item->height;
 	       goto potihandled;
Index: gui/ui/render.c
===================================================================
--- gui/ui/render.c	(revision 37113)
+++ gui/ui/render.c	(working copy)
@@ -479,6 +479,22 @@
             PutImage(item->x, item->y + (item->height - item->pheight) * (1.0 - item->value / 100.0), db, dw, &item->Mask, 3, index, True);
             break;
 
+        case itRPotmeter:
+
+            PutImage(item->x, item->y, db, dw, &item->Bitmap, item->numphases, (item->numphases - 1) * item->value / 100.0, True);
+            {
+                // Angle, CW, 0 at center/bottom
+                double a = (item->value / 100.0 * (1-2*RPOTMETER_STOP_GAP) + RPOTMETER_STOP_GAP) * 2*M_PI - M_PI;
+                // Radius, keeping the button just inside the potmeter outline
+                double r = (FFMIN(item->width, item->height) - FFMAX(item->pwidth, item->pheight)) / 2.0;
+                // Coordinates, related to the center of the potmeter outline
+                int x = item->x + r * (1 + sin(a)) + FFMAX(0, (item->width - item->height) / 2.0) + 0.5;
+                int y = item->y + r * (1 - cos(a)) + FFMAX(0, (item->height - item->width) / 2.0) + 0.5;
+                PutImage(x, y, db, dw, &item->Mask, 3, index, True);
+            }
+
+            break;
+
         case itSLabel:
 
             if (item->width == -1)
