Skip to content

Commit

Permalink
[rbp] Only send changes in hw cursor state
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Sep 18, 2015
1 parent ce6cb0d commit ac5e242
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion xbmc/linux/RBP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ CRBP::CRBP()
m_OMX = new COMXCore();
m_display = DISPMANX_NO_HANDLE;
m_p = NULL;
m_x = 0;
m_y = 0;
m_enabled = 0;
m_mb = mbox_open();
vcsm_init();
}
Expand Down Expand Up @@ -486,7 +489,11 @@ void CRBP::update_cursor(int x, int y, bool enabled)
int y2 = y * display.Height() / gui.Height();

//printf("%s %d,%d (%d)\n", __func__, x, y, enabled);
mailbox_set_cursor_position(m_mb, enabled, x2, y2);
if (m_x != x2 || m_y != y2 || m_enabled != enabled)
mailbox_set_cursor_position(m_mb, enabled, x2, y2);
m_x = x2;
m_y = y2;
m_enabled = enabled;
}

void CRBP::uninit_cursor()
Expand Down
5 changes: 4 additions & 1 deletion xbmc/linux/RBP.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ class CRBP

struct gpu_mem_ptr_s *m_p;
int m_mb;
public:
int m_x;
int m_y;
bool m_enabled;
public:
void init_cursor();
void set_cursor(const void *pixels, int width, int height, int hotspot_x, int hotspot_y);
void update_cursor(int x, int y, bool enabled);
Expand Down

0 comments on commit ac5e242

Please sign in to comment.