16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 19:29:19 +02:00

python leak fix, python touchscreens

This commit is contained in:
milek7
2019-11-26 22:20:46 +01:00
parent 5b172ec663
commit e697b01296
12 changed files with 163 additions and 39 deletions

11
Train.h
View File

@@ -107,7 +107,14 @@ class TTrain {
int radio_channel;
bool springbrake_active;
};
typedef std::tuple<std::string, std::shared_ptr<python_rt>, std::unique_ptr<python_screen_viewer>> screen_entry;
struct screen_entry {
std::string rendererpath;
std::shared_ptr<python_rt> rt;
std::unique_ptr<python_screen_viewer> viewer;
std::shared_ptr<std::vector<glm::vec2>> touch_list;
};
typedef std::vector<screen_entry> screen_map;
// methods
@@ -733,7 +740,7 @@ private:
// checks whether specified point is within boundaries of the active cab
bool point_inside( Math3D::vector3 const Point ) const;
Math3D::vector3 clamp_inside( Math3D::vector3 const &Point ) const;
const screen_map & get_screens();
const screen_map & get_screens();
float get_tacho();
float get_tank_pressure();