OMOTE/Platformio/OmoteUI/UIs/LvglMutex.hpp
MatthewColvin 94d75fa4d5 Make Key press sim use SDL event watcher for key event grabbing.
Create a mutex for UI that will help make it possible to run handlers that update UI elements on seprate threads.

its far from perfect but should hold up for now.
2023-10-02 20:41:42 -05:00

11 lines
221 B
C++

#pragma once
#include <mutex>
class LvglMutex {
public:
[[nodiscard]] static std::lock_guard<std::mutex> lockScope() {
return std::lock_guard<std::mutex>(mLvglMutex);
}
inline static std::mutex mLvglMutex;
};