Permalink
Browse files

Add ifdefs for compatibility with Player < 3.1

The Stage plugin contains some features (graphics2d multiline,
etc.) that were added in Player 3.1.  This commit adds some
code to let the latest version of Stage compile against Player
3.0.2 and earlier.
  • Loading branch information...
1 parent 0f72ec2 commit 98b921fd8cc0668ab8afe8bd60f0b761ca303f5f @jpgr87 committed Dec 13, 2012
Showing with 7 additions and 7 deletions.
  1. +4 −5 libstageplugin/p_graphics.cc
  2. +3 −2 libstageplugin/p_simulation.cc
@@ -232,8 +232,10 @@ int InterfaceGraphics2d::ProcessMessage(QueuePointer & resp_queue,
PLAYER_GRAPHICS2D_CMD_POINTS, this->addr)
|| Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
PLAYER_GRAPHICS2D_CMD_POLYLINE, this->addr)
+#ifdef PLAYER_GRAPHICS2D_CMD_MULTILINE
|| Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
PLAYER_GRAPHICS2D_CMD_MULTILINE, this->addr)
+#endif
|| Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
PLAYER_GRAPHICS2D_CMD_POLYGON, this->addr)) {
Message msg(*hdr, data);
@@ -273,7 +275,7 @@ void PlayerGraphics2dVis::RenderItem(Message & item) {
glEnd();
}
break;
-
+#ifdef PLAYER_GRAPHICS2D_CMD_MULTILINE
case PLAYER_GRAPHICS2D_CMD_MULTILINE: {
player_graphics2d_cmd_multiline_t
& data =
@@ -286,10 +288,7 @@ void PlayerGraphics2dVis::RenderItem(Message & item) {
}
break;
-
-
-
-
+#endif
case PLAYER_GRAPHICS2D_CMD_POLYGON: {
player_graphics2d_cmd_polygon_t
@@ -59,8 +59,9 @@ extern bool player_quiet_startup;
extern PlayerTime* GlobalTime;
#define DRIVER_ERROR(X) printf( "Stage driver error: %s\n", X )
-
-
+#ifndef PLAYER_CAPABILITIES_REQ
+#define PLAYER_CAPABILITIES_REQ PLAYER_CAPABILTIES_REQ
+#endif
////////////////////////////////////////////////////////////////////////////////////
//

0 comments on commit 98b921f

Please sign in to comment.