fix for Windows build

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6433 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3178183230bdfd578a9b0bd308e633da167c48e3
Former-commit-id: d5d250626f9b064932296dda4f9339a75d906f91
This commit is contained in:
beaglejoe 2016-06-02 19:29:31 +00:00
parent d6c18aac3b
commit 1cfd2fe6b1
3 changed files with 17 additions and 3 deletions

View file

@ -63,7 +63,7 @@
#include "forcefeedback.h"
extern ForceFeedbackManager forceFeedback;
extern TGFCLIENT_API ForceFeedbackManager forceFeedback;
float force = 0;

View file

@ -327,4 +327,4 @@ int ForceFeedbackManager::bumpsEffect(tCarElt* car, tSituation *s){
}
//initialize the force feedback
ForceFeedbackManager forceFeedback;
TGFCLIENT_API ForceFeedbackManager forceFeedback;

View file

@ -1,3 +1,5 @@
#ifndef __forcefeedback_h__
#define __forcefeedback_h__
/***************************************************************************
forcefeedback.h -- Interface file for The Gaming Framework
-------------------
@ -29,6 +31,17 @@
#include <car.h> //tCarElt
#include <raceman.h> //tSituation
// DLL exported symbols declarator for Windows.
#ifdef WIN32
# ifdef TGFCLIENT_DLL
# define TGFCLIENT_API __declspec(dllexport)
# else
# define TGFCLIENT_API __declspec(dllimport)
# endif
#else
# define TGFCLIENT_API
#endif
struct forceFeedBackEffect_t {
std::string name; //a name for the effect
@ -38,7 +51,7 @@ struct forceFeedBackEffect_t {
};
class ForceFeedbackManager {
class TGFCLIENT_API ForceFeedbackManager {
public:
void readConfiguration(std::string carName);
@ -74,3 +87,4 @@ class ForceFeedbackManager {
int globalMultiplier;
};
#endif // __forcefeedback_h__