Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to rebind keyboard device in vm-display-fbdev (FrameBuffer) #575 #576

Open
wants to merge 7 commits into
base: Cog
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 0 additions & 30 deletions build.linux32ARMv6/squeak.cog.spur/build/mvm

This file was deleted.

2 changes: 1 addition & 1 deletion build.linux32ARMv6/squeak.stack.spur/build.debug/mvm
Expand Up @@ -2,7 +2,7 @@
set -e
# debug Stack Spur VM with VM profiler and threaded heartbeat
INSTALLDIR=debug/sqstkspurlinuxhtRPi
OPT="-m32 -g3 -O0 -DDEBUGVM=1"
OPT="-m32 -g3 -O0 -DDEBUGVM=1 -DDEBUG_EVENTS=1 -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS "

if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
Expand Down
5 changes: 3 additions & 2 deletions build.linux64ARMv8/squeak.cog.spur/build.debug/mvm
Expand Up @@ -4,7 +4,8 @@ set -e
INSTALLDIR=debug/sqcogspur64ARMv8linuxht
# armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5
MACHINE="-march=armv8-a -mtune=cortex-a72"
OPT="-g3 -O0 -DDEBUGVM=1 -DAIO_DEBUG=1"
OPT="-g3 -O0 -DDEBUGVM=1 -DAIO_DEBUG=1 -DDEBUG -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DMUSL -D_GNU_SOURCE"


if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
Expand All @@ -20,7 +21,7 @@ test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure \
--with-vmversion=5.0 --with-src=spur64src \
--without-vm-display-fbdev --without-npsqueak \
--without-npsqueak \
CFLAGS="$MACHINE $OPT -DCOGMTVM=0 -DDUAL_MAPPED_CODE_ZONE=1" \
LIBS="-lrt"

Expand Down
3 changes: 2 additions & 1 deletion build.linux64ARMv8/squeak.cog.spur/build/mvm
Expand Up @@ -4,7 +4,8 @@ set -e
INSTALLDIR=sqcogspur64ARMv8linuxht
# armv8.N-a all fail in signalSemaphoreWithIndex for N in 1,2,3,4,5
MACHINE="-march=armv8-a -mtune=cortex-a72"
OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV"
OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE"
##OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV"
##OPT="-g -O3 -DNDEBUG -DDEBUGVM=0"

if [ $# -ge 1 ]; then
Expand Down
2 changes: 1 addition & 1 deletion build.linux64ARMv8/squeak.stack.spur/build.debug/mvm
Expand Up @@ -2,7 +2,7 @@
set -e
# debug Stack Spur VM with VM profiler and threaded heartbeat
INSTALLDIR=debug/sqstkspur64ARMv8linuxht
OPT="-g3 -O0 -DDEBUG -DDEBUGVM=1 -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DUSEEVDEV -DMUSL"
OPT="-g3 -O0 -DDEBUG -DDEBUGVM=1 -DDEBUG_EVENTS -DDEBUG_KEYBOARD_EVENTS -DDEBUG_MOUSE_EVENTS -DMUSL"

### OPT="-g3 -O0 -DDEBUGVM=1"

Expand Down
3 changes: 2 additions & 1 deletion build.linux64ARMv8/squeak.stack.spur/build/mvm
Expand Up @@ -2,7 +2,8 @@
set -e
# Stack Spur VM with VM profiler and threaded heartbeat
INSTALLDIR=sqstkspur64ARMv8linuxht
OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV"
OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE"
##OPT="-g -O2 -DNDEBUG -DDEBUGVM=0 -DMUSL -D_GNU_SOURCE -DUSEEVDEV"
### OPT="-g -O2 -DNDEBUG -DDEBUGVM=0"

if [ $# -ge 1 ]; then
Expand Down
28 changes: 14 additions & 14 deletions platforms/unix/vm-display-fbdev/sqUnixFBDev.c
Expand Up @@ -124,12 +124,12 @@ static struct kb *kb= 0;
static struct fb *fb= 0;

#include "sqUnixFBDevUtil.c"
#ifdef USEEVDEV
#include "sqUnixEvdevKeycodeMap.c"
#include "sqUnixEvdevKeyMouse.c"
#else
#ifdef NOEVDEV
#include "sqUnixFBDevMouse.c"
#include "sqUnixFBDevKeyboard.c"
#else
#include "sqUnixEvdevKeycodeMap.c"
#include "sqUnixEvdevKeyMouse.c"
#endif
#include "sqUnixFBDevFramebuffer.c"

Expand Down Expand Up @@ -173,7 +173,7 @@ static void openKeyboard(void)
{
kb= kb_new();
kb_open(kb, vtSwitch, vtLock);
#ifndef USEEVDEV
#ifdef NOEVDEV
kb_setCallback(kb, enqueueKeyboardEvent);
#endif
}
Expand All @@ -182,11 +182,11 @@ static void closeKeyboard(void)
{
if (kb)
{
#ifndef USEEVDEV
#ifdef NOEVDEV
kb_setCallback(kb, 0);
#endif
kb_close(kb);
#ifndef USEEVDEV
#ifdef NOEVDEV
kb_delete(kb);
#endif
kb= 0;
Expand All @@ -209,7 +209,7 @@ static void openMouse(void)
{
ms= ms_new();
ms_open(ms, msDev, msProto);
#ifndef USEEVDEV
#ifdef NOEVDEV
ms_setCallback(ms, enqueueMouseEvent);
#endif
}
Expand All @@ -218,11 +218,11 @@ static void closeMouse(void)
{
if (ms)
{
#ifndef USEEVDEV
#ifdef NOEVDEV
ms_setCallback(ms, 0);
#endif
ms_close(ms);
#ifndef USEEVDEV
#ifdef NOEVDEV
ms_delete(ms);
#endif
ms= 0;
Expand All @@ -246,12 +246,12 @@ static sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds)

static sqInt display_ioProcessEvents(void)
{
#ifdef USEEVDEV
#ifdef NOEVDEV
aioPoll(0);
#else
processLibEvdevMouseEvents();
processLibEvdevKeyEvents(); /* sets modifier bits */
processLibEvdevMouseEvents();
#else
aioPoll(0);
#endif
return 0;
}
Expand Down Expand Up @@ -314,7 +314,7 @@ static void openDisplay(void)
openFramebuffer();
// init mouse after setting graf mode on tty avoids packets being
// snarfed by gpm
#ifndef USEEVDEV
#ifdef NOEVDEV
ms->init(ms);
#endif
}
Expand Down