Fix SA1 open bus
[lsnes.git] / src / core / dummyjoy.cpp
blob0c221b1a5e022b8f11d07a8790d56a69f468e32b
1 #include "core/joystickapi.hpp"
2 #include "core/keymapper.hpp"
4 namespace
6 void dummy_init() throw() {}
7 void dummy_quit() throw() {}
8 void dummy_thread_fn() throw() {}
9 void dummy_signal() throw() {}
10 const char* dummy_name() { return "Dummy joystick plugin"; }
12 _joystick_driver driver = {
13 .init = dummy_init,
14 .quit = dummy_quit,
15 .thread_fn = dummy_thread_fn,
16 .signal = dummy_signal,
17 .name = dummy_name
21 joystick_driver::joystick_driver(_joystick_driver drv)
23 driver = drv;
26 void joystick_driver_init() throw()
28 lsnes_gamepads_init();
29 driver.init();
32 void joystick_driver_quit() throw()
34 driver.quit();
35 lsnes_gamepads_deinit();
38 void joystick_driver_thread_fn() throw()
40 driver.thread_fn();
43 void joystick_driver_signal() throw()
45 driver.signal();
48 const char* joystick_driver_name()
50 return driver.name();