mirror of
https://github.com/wiiu-env/ScreenshotWUPS.git
synced 2024-11-21 22:19:15 +01:00
Fix the default button combo
This commit is contained in:
parent
3ffae910c1
commit
81bbe5f810
@ -29,7 +29,7 @@ void InitConfig() {
|
|||||||
DEBUG_FUNCTION_LINE_ERR("Failed to init config api");
|
DEBUG_FUNCTION_LINE_ERR("Failed to init config api");
|
||||||
}
|
}
|
||||||
|
|
||||||
gButtonCombo = VPAD_BUTTON_TV;
|
gButtonCombo = BUTTON_COMBO_CONFIG_DEFAULT;
|
||||||
|
|
||||||
WUPSStorageError storageRes;
|
WUPSStorageError storageRes;
|
||||||
if ((storageRes = WUPSStorageAPI::GetOrStoreDefault(ENABLED_CONFIG_STRING, gEnabled, ENABLED_CONFIG_DEFAULT)) != WUPS_STORAGE_ERROR_SUCCESS) {
|
if ((storageRes = WUPSStorageAPI::GetOrStoreDefault(ENABLED_CONFIG_STRING, gEnabled, ENABLED_CONFIG_DEFAULT)) != WUPS_STORAGE_ERROR_SUCCESS) {
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <vpad/input.h>
|
||||||
|
|
||||||
#define ENABLED_CONFIG_DEFAULT true
|
#define ENABLED_CONFIG_DEFAULT true
|
||||||
#define FORMAT_CONFIG_DEFAULT IMAGE_OUTPUT_FORMAT_JPEG
|
#define FORMAT_CONFIG_DEFAULT IMAGE_OUTPUT_FORMAT_JPEG
|
||||||
#define QUALITY_CONFIG_DEFAULT 90
|
#define QUALITY_CONFIG_DEFAULT 90
|
||||||
#define SCREEN_CONFIG_DEFAULT IMAGE_SOURCE_TV_AND_DRC
|
#define SCREEN_CONFIG_DEFAULT IMAGE_SOURCE_TV_AND_DRC
|
||||||
#define BUTTON_COMBO_CONFIG_DEFAULT 0
|
#define BUTTON_COMBO_CONFIG_DEFAULT VPAD_BUTTON_TV
|
||||||
#define RESERVED_BIT_USAGE_CONFIG_DEFAULT true
|
#define RESERVED_BIT_USAGE_CONFIG_DEFAULT true
|
||||||
|
|
||||||
#define ENABLED_CONFIG_STRING "enabled"
|
#define ENABLED_CONFIG_STRING "enabled"
|
||||||
|
@ -93,7 +93,7 @@ DECL_FUNCTION(int32_t, VPADRead, VPADChan chan, VPADStatus *buffer, uint32_t buf
|
|||||||
VPADReadError real_error;
|
VPADReadError real_error;
|
||||||
int32_t result = real_VPADRead(chan, buffer, buffer_size, &real_error);
|
int32_t result = real_VPADRead(chan, buffer, buffer_size, &real_error);
|
||||||
|
|
||||||
if (gEnabled) {
|
if (gEnabled && gButtonCombo != 0) {
|
||||||
if (result > 0 && real_error == VPAD_READ_SUCCESS) {
|
if (result > 0 && real_error == VPAD_READ_SUCCESS) {
|
||||||
uint32_t end = 1;
|
uint32_t end = 1;
|
||||||
// Fix games like TP HD
|
// Fix games like TP HD
|
||||||
@ -130,7 +130,7 @@ static uint32_t sWasHoldForXFrame[4];
|
|||||||
DECL_FUNCTION(void, WPADRead, WPADChan chan, WPADStatusProController *data) {
|
DECL_FUNCTION(void, WPADRead, WPADChan chan, WPADStatusProController *data) {
|
||||||
real_WPADRead(chan, data);
|
real_WPADRead(chan, data);
|
||||||
|
|
||||||
if (gEnabled && chan >= 0 && chan < 4) {
|
if (gEnabled && gButtonCombo > 0 && chan >= 0 && chan < 4) {
|
||||||
if (data[0].err == 0) {
|
if (data[0].err == 0) {
|
||||||
if (data[0].extensionType != 0xFF) {
|
if (data[0].extensionType != 0xFF) {
|
||||||
uint32_t curButtonHold = 0;
|
uint32_t curButtonHold = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user