Skip to content

Commit

Permalink
Added workaround for compiling libstageplugin against versions of Pla…
Browse files Browse the repository at this point in the history
…yer without PLAYER_GRAPHICS2D_CMD_MULTILINE. The multiline message was added in Player SVN leading up to version 3.1, this maintains compatibility for 3.0 and earlier.
  • Loading branch information
Rich Mattes authored and richmattes committed Jan 24, 2011
1 parent db09054 commit e133adf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libstageplugin/p_graphics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,11 @@ int InterfaceGraphics2d::ProcessMessage(QueuePointer & resp_queue,
PLAYER_GRAPHICS2D_CMD_POINTS, this->addr)
|| Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD,
PLAYER_GRAPHICS2D_CMD_POLYLINE, this->addr)
// Draw Multiline is new in Player 3.1, this ifdef allows Stage to build against older versions of Player
#if defined 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);
Expand Down Expand Up @@ -273,7 +276,8 @@ void PlayerGraphics2dVis::RenderItem(Message & item) {
glEnd();
}
break;

// Draw Multiline is new in Player 3.1, this ifdef allows Stage to build against older versions of Player
#if defined PLAYER_GRAPHICS2D_CMD_MULTILINE
case PLAYER_GRAPHICS2D_CMD_MULTILINE: {
player_graphics2d_cmd_multiline_t
& data =
Expand All @@ -286,7 +290,7 @@ void PlayerGraphics2dVis::RenderItem(Message & item) {
}
break;


#endif



Expand Down

0 comments on commit e133adf

Please sign in to comment.