Added use of sizeof to make code a bit more flexible
This commit is contained in:
parent
49cf25718c
commit
7efe889537
@ -1770,7 +1770,7 @@ void GraphicsWindowX11::transformMouseXY(float& x, float& y)
|
|||||||
void GraphicsWindowX11::adaptKey(XKeyEvent& keyevent, int& keySymbol, int& unmodifiedKeySymbol)
|
void GraphicsWindowX11::adaptKey(XKeyEvent& keyevent, int& keySymbol, int& unmodifiedKeySymbol)
|
||||||
{
|
{
|
||||||
unsigned char buffer_return[32];
|
unsigned char buffer_return[32];
|
||||||
int bytes_buffer = 32;
|
int bytes_buffer = sizeof(buffer_return);
|
||||||
KeySym keysym_return;
|
KeySym keysym_return;
|
||||||
|
|
||||||
int numChars = XLookupString(&keyevent, reinterpret_cast<char*>(buffer_return), bytes_buffer, &keysym_return, NULL);
|
int numChars = XLookupString(&keyevent, reinterpret_cast<char*>(buffer_return), bytes_buffer, &keysym_return, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user