ソースを参照

updateFrame only gets called when video is playing

Alexander Hendrich 10 年 前
コミット
effeed8a95
1 ファイル変更9 行追加1 行削除
  1. 9 1
      bbiwarg/Graphics/OutputWindow.cs

+ 9 - 1
bbiwarg/Graphics/OutputWindow.cs

@@ -50,6 +50,7 @@ namespace bbiwarg.Graphics
             // video controls
             if (inputProvider is VideoInputProvider)
             {
+                Keyboard.KeyRepeat = true;
                 Keyboard.KeyDown += HandleKeyDown;
                 Logger.log("video controls enabled (space=pause, right=nextFrame, left=previousFrame)", LogSubject.VideoControls);
             }
@@ -88,7 +89,8 @@ namespace bbiwarg.Graphics
             GL.MatrixMode(MatrixMode.Modelview);
             GL.LoadMatrix(ref modelview);
 
-            inputHandler.updateFrame();
+            if(!(inputProvider is VideoInputProvider) || (inputProvider is VideoInputProvider && !((VideoInputProvider)inputProvider).IsPaused))
+                inputHandler.updateFrame();
 
             Title = Constants.OutputTitle + " (Frame: " + inputProvider.CurrentFrame + ")";
 
@@ -137,11 +139,17 @@ namespace bbiwarg.Graphics
                     break;
                 case Key.Right:
                     if (vip.IsPaused)
+                    {
                         vip.nextFrame();
+                        inputHandler.updateFrame();
+                    }
                     break;
                 case Key.Left:
                     if (vip.IsPaused)
+                    {
                         vip.previousFrame();
+                        inputHandler.updateFrame();
+                    }
                     break;
             }
         }