diff options
| author | Xavier ASUS <xavi92psx@gmail.com> | 2018-11-30 01:37:33 +0100 |
|---|---|---|
| committer | Xavier ASUS <xavi92psx@gmail.com> | 2018-11-30 01:37:33 +0100 |
| commit | e67ae8402090ae7a242a4c2030042b571228bffc (patch) | |
| tree | aeb1c7d0378ea92e78df90e06b7d0a355dfae246 /qpsxserial.h | |
| parent | 48ce5c59fe7f981d9f2da6ee9ddb9bbf03c8945b (diff) | |
QApplication::processEvents() would not work under Linux if ACK bytes are to be received from the target device. This has been changed by a call to a blocking function which ensures input data has been received.HEADmaster
Diffstat (limited to 'qpsxserial.h')
| -rw-r--r-- | qpsxserial.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/qpsxserial.h b/qpsxserial.h index 18b2c12..21050a5 100644 --- a/qpsxserial.h +++ b/qpsxserial.h @@ -8,19 +8,20 @@ #include <QTimer> #include <QThread> #include <QTime> +#ifdef __WIN32__ #include <QWinTaskbarButton> +#endif #include <QMessageBox> #include <iostream> #include "ui_stdout.h" -#define QPSXSERIAL_VERSION_NUMBER 0.4 -#define QPSXSERIAL_VERSION_STR "0.4" +#define QPSXSERIAL_VERSION_STR "0.5" #define QPSXSERIAL_URL "https://github.com/XaviDCR92/OpenSend" #define OPENSEND_URL "https://github.com/XaviDCR92/QPSXSerial/" -typedef enum t_AppInterface +typedef enum { - CLI_APP = 0, + CLI_APP, GUI_APP }APP_INTERFACE; @@ -33,7 +34,7 @@ class QPSXSerial : public QMainWindow Q_OBJECT public: - explicit QPSXSerial(QWidget *parent = 0, APP_INTERFACE interface = GUI_APP); + explicit QPSXSerial(QWidget *parent = nullptr, APP_INTERFACE interface = GUI_APP); ~QPSXSerial(); void setParamList(QStringList param){_paramlist = param;} @@ -49,19 +50,19 @@ private: Ui::QPSXSerial *ui; Ui::Stdout_Console *stdout_ui; QDialog *stdout_dialog; - APP_INTERFACE app_interface; + const APP_INTERFACE app_interface; QString inputExe; QString selectedPort; QString selectedFolder; QSerialPort serial; bool ack; bool exe_sent; - QTimer* init_timer; + QTimer init_timer; bool write_ready; bool byte_sent_received; QByteArray last_packet_sent; bool first_entered; - QTimer* lost_packet_timer; + QTimer lost_packet_timer; QStringList _paramlist; bool disable_psx_stdout; |
