mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Cleanup of touch screen code.
Initialize in constructor and clean up in destructor instead of having separate init() and deinit() methods. Don't close file descriptor if open failed (ts_fd == -1). Renamed initialized() to available(), since it tests whether the touch screen was found, not whether an initialization was attempted. Improved code layout and minor other cleanups.
This commit is contained in:
@@ -174,7 +174,7 @@ public:
|
||||
//firmware type and version
|
||||
std::string fwType, fwVersion;
|
||||
|
||||
bool isF200() { return ts.initialized(); }
|
||||
bool isF200() { return ts.available(); }
|
||||
|
||||
// Open2x settings ---------------------------------------------------------
|
||||
bool o2x_usb_net_on_boot, o2x_ftp_on_boot, o2x_telnet_on_boot, o2x_gp2xjoy_on_boot, o2x_usb_host_on_boot, o2x_usb_hid_on_boot, o2x_usb_storage_on_boot;
|
||||
|
||||
Reference in New Issue
Block a user