ManyMouse fix.
This commit is contained in:
parent
263409a743
commit
c3b82d2627
2 changed files with 20 additions and 2 deletions
|
|
@ -986,6 +986,15 @@ API Changes
|
|||
Fixes
|
||||
-----
|
||||
|
||||
- A machine with no enumerable mouse keeps its pointer. ManyMouse reads
|
||||
/dev/input/event* directly where there is no X server, and those nodes
|
||||
are root:input, so an account that was never added to the "input" group
|
||||
enumerated nothing -- and Singe then switched off all mouse input,
|
||||
including SDL's own pointer, which single-mouse mode is the only user
|
||||
of. On a KMSDRM cabinet or handheld that left the mouse and the light
|
||||
gun dead with only "No mice detected" to explain it. Only --manymouse
|
||||
needs those devices now, and the message names the group.
|
||||
|
||||
- A lone .m2v played with --framefile now finds the .ogg beside it, as a
|
||||
framefile's segments always have. A Daphne era elementary stream
|
||||
carries no audio of its own, so lair.m2v played silently unless it was
|
||||
|
|
|
|||
|
|
@ -15567,9 +15567,18 @@ void singe(SDL_Window *window, SDL_Renderer *renderer, SDL_GPUDevice *device, Co
|
|||
if (_global.mouseCount > MAX_MICE) {
|
||||
_global.mouseCount = MAX_MICE;
|
||||
}
|
||||
// ManyMouse enumerates /dev/input itself, which needs membership of the "input" group; SDL's
|
||||
// own pointer needs nothing. Only many-mouse mode reads ManyMouse's events -- the poll in the
|
||||
// event loop discards them in single-mouse mode -- so enumerating nothing must not cost a
|
||||
// machine its pointer, or Singe has no mouse at all on a stock Debian or Ubuntu install, in a
|
||||
// container, or under any account that was never added to that group.
|
||||
if ((_global.mouseCount < 1) && _global.mouseEnabled) {
|
||||
if (_global.conf->manyMouse) {
|
||||
utilSay("Warning: No mice detected. Mouse input disabled.");
|
||||
_global.mouseEnabled = false;
|
||||
} else {
|
||||
utilSay("Warning: No mice could be enumerated; using the system pointer. Light guns and --manymouse need this user in the \"input\" group.");
|
||||
}
|
||||
}
|
||||
for (x = 0; x < _global.mouseCount; x++) {
|
||||
strncpy(_global.mice[x].name, ManyMouse_DeviceName((unsigned)x), sizeof(_global.mice[x].name) - 1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue