From 1edb87b13a58cbb87cbf99ee30cc5ee7eb15003a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 27 Apr 2013 12:48:22 +0200 Subject: Implement game name in the UI, lost previously due to refactoring. --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 9 --------- ftnoir_protocol_sc/ftnoir_protocol_sc.h | 8 +++++--- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'ftnoir_protocol_sc') diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 39c98ea7..9d2fb498 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -359,15 +359,6 @@ void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData } } -// -// Return a name, if present the name from the Game, that is connected... -// -void FTNoIR_Protocol::getNameFromGame( char *dest ) -{ - sprintf(dest, "Microsoft FSX"); - return; -} - //////////////////////////////////////////////////////////////////////////////// // Factory function that creates instances if the Protocol object. diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index e9dcfbb2..f069aa9c 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -86,7 +86,9 @@ public: void Initialize() {} bool checkServerInstallationOK(); void sendHeadposeToGame( double *headpose, double *rawheadpose ); - void getNameFromGame( char *dest ); // Take care dest can handle up to 100 chars... + QString getGameName() { + return "FS2004/FSX"; + } private: // Private properties @@ -139,10 +141,10 @@ public: void Initialize(QWidget *parent); void registerProtocol(IProtocol *protocol) { theProtocol = (FTNoIR_Protocol *) protocol; // Accept the pointer to the Protocol - }; + } void unRegisterProtocol() { theProtocol = NULL; // Reset the pointer - }; + } private: Ui::UICSCControls ui; -- cgit v1.2.3