示例#1
0
        public KeyboardController(InputHandler inputHandler, Range memoryRange, string name)
            : base(memoryRange, name)
        {
            var directInput = new DirectInput();

            this.keyboard = new Keyboard(directInput);

            this.inputHandler = inputHandler;

            this.keyboard.Properties.BufferSize = 128;
            this.keyboard.Acquire();

            this.keyboardPollTask = this.PollKeyboard();
        }
示例#2
0
 public MemoryMappedSegment(int lowerIndex, int upperIndex, string name = "")
 {
     this.Range = new Range(lowerIndex, upperIndex);
     this.Name  = name;
 }