diff options
author | Javier <dev.git@javispedro.com> | 2022-04-03 21:23:10 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-04-03 21:23:10 +0200 |
commit | a5abb118e0e61587adfa7b4e4cc72948311381d3 (patch) | |
tree | b226705401bd0b4c78399c621cebc1fbab6003b9 /vbox.h | |
parent | 7d93442564b57c2d292df7f823c2115d3e0b8c12 (diff) | |
download | vbados-a5abb118e0e61587adfa7b4e4cc72948311381d3.tar.gz vbados-a5abb118e0e61587adfa7b4e4cc72948311381d3.zip |
try to handle graphical cursor rendering in a more generic way
Diffstat (limited to 'vbox.h')
-rw-r--r-- | vbox.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -145,4 +145,13 @@ static int vbox_set_pointer_visible(LPVBOXCOMM vb, bool visible) return req->header.rc; } +/** Computes size of a VMMDevReqMousePointer message. */ +static inline unsigned vbox_req_mouse_pointer_size(unsigned width, unsigned height) +{ + const unsigned and_mask_size = (width + 7) / 8 * height; + const unsigned xor_mask_size = width * height * 4; + const unsigned data_size = and_mask_size + xor_mask_size; + return MAX(sizeof(VMMDevReqMousePointer), 24 + 20 + data_size); +} + #endif |