On X11, hiro uses the xdg-screensaver helper tool to disable the screensaver,
which detects the screensaver that is running and uses the appropriate
mechanism to communicate with it. The tool's API expects an X11 window ID,
but at least some screensavers ignore it, so it can be set up however. The
GNOME backend *does* care about the window ID, but its expectations are not
documented anywhere, so byuu spent a frustrating few days trying things
at random to get it working, and failing.
It turns out, GNOME does *not* require the window to be mapped, but it *does*
require the window to have a name. Using XStoreName() to name the window fixes
screensaver suspension for me under GNOME 3.38.
Note: while XStoreName is technically deprecated, it's not going to go away
while X11 is still around, and the reason it's deprecated is because it doesn't
include character encoding data. We don't care — no user should ever see the
window name, and it's plain ASCII so it should be fine.
Fixes#102.
This corrects the reporting bit of HVBJOY to be set during the auto joypad
polling sequence.
This change will fix *SpellCraft - Aspects of Valor*. SpellCraft works by
polling JOY1 nonstop once menus are entered on every scanline, so with incorrect
HVBJOY bit 0 reporting, the game was thinking it was safe to read JOY1 during
the auto joypad polling sequence, so partially shifted in results were being
read back as valid. With this patch, you'll find that the game stops polling
between V:225 H:130 and V:228 H:256, which is the auto polling time range.
Before, it was polling during that time. As a result of this fix, the password
menu can be accessed safely without it closing immediately.
Fixes#86.
- Fixes a bug where the program may crash or display improper buttons
when changing the selected row during assignment.
This appears to just be a mistake, accidentally using the 'batched'
rows instead of the activeMapping row.
- Fixes a bug where starting multiple assignments without finishing
one leads to stale "Assigning..." text in some rows.
This appears to be an oversight. Simply refreshing the mappings
before starting an assignment fixes this.
This commit reworks when the screensaver suppression kicks in.
Previously, bsnes would only engage screensaver suppression once, on
application launch. Now that the option is exposed and can be toggled at
any time, we have to be a little more clever.
Additionally, screensaver suppression is now only engaged while
emulation is active, because it doesn't make much sense otherwise.
The setting already existed and could be changed by manually editing the
configuration file, but wasn't exposed in the UI. This commit adds the
corresponding check box.