input.cpp 441 B

123456789101112131415
  1. auto Emulator::inputUpdate() -> void {
  2. if(inputInstance && inputInstance.driver() != settings.input.driver) {
  3. inputInstance.reset();
  4. }
  5. if(!inputInstance) {
  6. inputInstance.create(settings.input.driver);
  7. inputInstance.setContext(program.handle());
  8. inputInstance.onChange({&InputManager::eventInput, &inputManager});
  9. if(!inputInstance.ready()) {
  10. inputInstance.create(settings.input.driver = "None");
  11. }
  12. }
  13. }