mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-10-06 01:58:13 -07:00
overlay: create a dedicated thread for polling hotkeys (#864)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Create a new thread that polls for the following hotkeys: * super exit (both alt+f4 and bound key) * coin insert * screenshot The goal is to make the capture of these more reliable, because before this PR it wasn't. ## Testing
This commit is contained in:
@@ -17,11 +17,13 @@
|
||||
#include "games/ddr/ddr.h"
|
||||
#include "games/gitadora/gitadora.h"
|
||||
#include "games/iidx/iidx.h"
|
||||
#include "games/io.h"
|
||||
#include "games/sdvx/sdvx.h"
|
||||
#include "games/popn/popn.h"
|
||||
#include "hooks/graphics/backends/d3d9/d3d9_backend.h"
|
||||
#include "hooks/graphics/backends/d3d11/d3d11_backend.h"
|
||||
#include "launcher/shutdown.h"
|
||||
#include "misc/hotkeys.h"
|
||||
#include "overlay/overlay.h"
|
||||
#include "touch/touch.h"
|
||||
#include "touch/touch_gestures.h"
|
||||
@@ -1374,6 +1376,12 @@ void graphics_screens_get(std::vector<int> &screens) {
|
||||
screens.insert(screens.end(), GRAPHICS_SCREENS.begin(), GRAPHICS_SCREENS.end());
|
||||
}
|
||||
|
||||
void graphics_poll_screenshot_hotkey() {
|
||||
if (hotkeys::consume_screenshot()) {
|
||||
graphics_screenshot_trigger();
|
||||
}
|
||||
}
|
||||
|
||||
void graphics_screenshot_trigger() {
|
||||
GRAPHICS_SCREENSHOT_TRIGGER = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user