DeviceBinds.cpp 473 B

123456789101112131415161718192021222324252627
  1. #include "Device.h"
  2. #include "LuaEnvironment.h"
  3. #include "LuaStack.h"
  4. namespace crown
  5. {
  6. extern "C"
  7. {
  8. //-----------------------------------------------------------------------------
  9. int32_t device_stop(lua_State* L)
  10. {
  11. device()->stop();
  12. return 0;
  13. }
  14. } // extern "C"
  15. //-----------------------------------------------------------------------------
  16. void load_device(LuaEnvironment& env)
  17. {
  18. env.load_module_function("Device", "stop", device_stop);
  19. }
  20. } // namespace crown