Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Linux build may fail with current 1.2 CVS  (Read 582 times)

slarti

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 9
    • View Profile
Linux build may fail with current 1.2 CVS
« on: August 22, 2009, 02:53:50 PM »

I've just tried to compile the current 1.2 CVS version on a remote machine (debian I think, but quite specialised). The build failed because linux/input.h didn't define the FF_EFFECT_MIN and FF_WAVEFORM_MIN macros. Of course I cannot confirm that the header file was original, but our IT guys have no reason to delete a few macros. It might just be an older version. Anyway I propose the following fix:

Code: [Select]
--- linux/EventHelpers.cpp (revision 5668)
+++ linux/EventHelpers.cpp (working copy)
@@ -35,6 +35,20 @@
 # include <iostream>
 #endif
 
+// Fixes for missing macros in input.h
+#ifndef FF_EFFECT_MIN
+#define FF_EFFECT_MIN FF_RUMBLE
+#endif
+#ifndef FF_EFFECT_MAX
+#define FF_EFFECT_MAX FF_RAMP
+#endif
+#ifndef FF_WAVEFORM_MIN
+#define FF_WAVEFORM_MIN FF_SQUARE
+#endif
+#ifndef FF_WAVEFORM_MAX
+#define FF_WAVEFORM_MAX FF_CUSTOM
+#endif
+
 using namespace std;
 using namespace OIS;
 
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: Linux build may fail with current 1.2 CVS
« Reply #1 on: August 22, 2009, 03:59:45 PM »

Please submit as a patch so it doesn't get lost on the forum. I haven't tried the latest distro's out there, but I don't know why that header include would be missing some defines - I don't think it would be missing in an old version, but who knows - Linux API's are not always known for remaining the same.
Logged