Example #1
0
 private void UpdateAllCommands()
 {
     CommandFileOpen.Update();
     CommandFileSave.Update();
     CommandFileExit.Update();
     CommandViewFullScreen.Update();
     CommandViewSyncSource.Update();
     CommandViewScaleMode.Update();
     CommandViewVideoFilter.Update();
     CommandViewSmooth.Update();
     CommandViewMimicTv.Update();
     CommandViewDisplayIcon.Update();
     CommandViewDebugInfo.Update();
     CommandViewToolBar.Update();
     CommandViewStatusBar.Update();
     CommandViewScaleRatio.Update();
     CommandVmPause.Update();
     CommandVmMaxSpeed.Update();
     CommandVmWarmReset.Update();
     //CommandVmColdReset.Update();
     CommandVmNmi.Update();
     CommandVmSettings.Update();
     CommandHelpViewHelp.Update();
     CommandHelpKeyboardHelp.Update();
     CommandHelpAbout.Update();
     CommandTapePause.Update();
     CommandQuickLoad.Update();
     CommandOpenUri.Update();
 }
Example #2
0
        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            var kbdState   = Keyboard.GetState();
            var mouseState = Mouse.GetState();

            UpdateInput(kbdState, mouseState);

            var isAlt = kbdState[Keys.LeftAlt] == KeyState.Down ||
                        kbdState[Keys.RightAlt] == KeyState.Down;
            var isCtrl = kbdState[Keys.LeftControl] == KeyState.Down ||
                         kbdState[Keys.RightControl] == KeyState.Down;

            if (isAlt && isCtrl &&
                CommandVmWarmReset != null &&
                CommandVmWarmReset.CanExecute(null))
            {
                CommandVmWarmReset.Execute(kbdState[Keys.Insert] == KeyState.Down);
            }
        }