mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-23 15:25:01 +00:00
On 64-bit systems, the X11 port was ignoring every other keystroke. This
is because XCursesSendKeyToCurses() was mistakenly pushing an int instead of a long. (If there are any 16-bit X11 systems out there, they'd also be affected.)
This commit is contained in:
@@ -2699,7 +2699,7 @@ MOUSE_STATUS *ms;
|
||||
if (trace_on) PDC_debug("%s:XCursesSendKeyToCurses() - called: sending %d\n",(XCursesProcess)?" X":"CURSES",key);
|
||||
#endif
|
||||
memcpy(buf,(char *)&key,sizeof(unsigned long));
|
||||
if (write_socket(key_sock,buf,sizeof(int)) < 0)
|
||||
if (write_socket(key_sock,buf,sizeof(unsigned long)) < 0)
|
||||
XCursesExitXCursesProcess(1,SIGKILL,"exiting from XCursesSendKeyToCurses");
|
||||
if ( ms != NULL )
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ int delaytenths;
|
||||
if (read_socket(key_sock,buf,sizeof(unsigned long)) < 0)
|
||||
XCursesExitCursesProcess(2,"exiting from XCurses_rawchar"); /* what else ?? */
|
||||
memcpy((char *)&newkey,buf,sizeof(unsigned long));
|
||||
pdc_key_modifier = newkey >> 24; /*(sizeof(unsigned long) - sizeof(unsigned char)); */
|
||||
pdc_key_modifier = (newkey >> 24) & 0xFF; /*(sizeof(unsigned long) - sizeof(unsigned char)); */
|
||||
key = (int)(newkey & 0x00FFFFFF);
|
||||
}
|
||||
#if 0
|
||||
|
||||
@@ -212,7 +212,7 @@ int delaytenths;
|
||||
if (read_socket(key_sock,buf,sizeof(unsigned long)) < 0)
|
||||
XCursesExitCursesProcess(2,"exiting from XCurses_rawchar"); /* what else ?? */
|
||||
memcpy((char *)&newkey,buf,sizeof(unsigned long));
|
||||
pdc_key_modifier = newkey >> 24; /*(sizeof(unsigned long) - sizeof(unsigned char)); */
|
||||
pdc_key_modifier = (newkey >> 24) & 0xFF; /*(sizeof(unsigned long) - sizeof(unsigned char)); */
|
||||
key = (int)(newkey & 0x00FFFFFF);
|
||||
}
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user