Skip to content

Commit

Permalink
Fixed SDL 1.2 compat issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceLR committed Jul 11, 2013
1 parent 6c0c16c commit af59288
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/editor/robo_ed.c
Expand Up @@ -1379,7 +1379,11 @@ static int copy_buffer_to_X11_selection(const SDL_Event *event)

static void copy_buffer_to_selection(void)
{
#if SDL_VERSION_ATLEAST(2,0,0)
SDL_Window *window = SDL_GetWindowFromID(sdl_window_id);
#else
SDL_Window *window = SDL_GetWindowFromID(graphics.window_id);
#endif
SDL_SysWMinfo info;

SDL_VERSION(&info.version);
Expand All @@ -1396,7 +1400,11 @@ static void copy_buffer_to_selection(void)

static bool copy_selection_to_buffer(struct robot_state *rstate)
{
#if SDL_VERSION_ATLEAST(2,0,0)
SDL_Window *window = SDL_GetWindowFromID(sdl_window_id);
#else
SDL_Window *window = SDL_GetWindowFromID(graphics.window_id);
#endif
int selection_format, line_length, ret_type;
char line_buffer[COMMAND_BUFFER_LEN];
unsigned long int nbytes, overflow;
Expand Down

0 comments on commit af59288

Please sign in to comment.