ButtonComboAPI: Hold duration is now measure in ms instead of frames

This commit is contained in:
Maschell 2025-01-01 14:33:37 +01:00
parent 9a9c1c092c
commit bebae31682
5 changed files with 12 additions and 12 deletions

View File

@ -1,11 +1,11 @@
FROM ghcr.io/wiiu-env/devkitppc:20241128
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20240424 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:0.8.2-dev-20241226-f71cb8c /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:0.8.2-dev-20241231-67b8431 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libmappedmemory:20230621 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libwupsbackend:20240425 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libnotifications:20240426 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libbuttoncombo:20241226-12d1594 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/libbuttoncombo:20241231-a2f949b /artifacts $DEVKITPRO
WORKDIR project

View File

@ -270,7 +270,7 @@ namespace {
options.basicCombo.combo = convert(other.basicCombo.combo);
options.basicCombo.controllerMask = convert(other.basicCombo.controllerMask);
options.type = convertType(other.type);
options.optionalHoldForXFrames = other.optionalHoldForXFrames;
options.optionalHoldForXMs = other.optionalHoldForXMs;
return options;
}
@ -279,7 +279,7 @@ namespace {
options.type = convertType(other.type);
options.basicCombo.combo = convert(other.basicCombo.combo);
options.basicCombo.controllerMask = convert(other.basicCombo.controllerMask);
options.optionalHoldForXFrames = other.optionalHoldForXFrames;
options.optionalHoldForXMs = other.optionalHoldForXMs;
return options;
}
@ -408,8 +408,8 @@ public:
return res;
}
[[nodiscard]] WUPSButtonCombo_Error UpdateHoldDuration(const uint32_t holdDurationInFrames) const {
return convertError(ButtonComboModule_UpdateHoldDuration(mButtonComboHandle, holdDurationInFrames));
[[nodiscard]] WUPSButtonCombo_Error UpdateHoldDuration(const uint32_t holdDurationInMs) const {
return convertError(ButtonComboModule_UpdateHoldDuration(mButtonComboHandle, holdDurationInMs));
}
[[nodiscard]] WUPSButtonCombo_Error GetButtonComboMeta(WUPSButtonCombo_MetaOptionsOut &outOptions) const {
@ -526,9 +526,9 @@ WUPSButtonCombo_Error ButtonComboManager::UpdateButtonCombo(const WUPSButtonComb
}
WUPSButtonCombo_Error ButtonComboManager::UpdateHoldDuration(const WUPSButtonCombo_ComboHandle handle,
const uint32_t holdDurationInFrames) {
const uint32_t holdDurationInMs) {
return ExecuteForWrapper(handle, [&](const ButtonComboWrapper &wrapper) {
return wrapper.UpdateHoldDuration(holdDurationInFrames);
return wrapper.UpdateHoldDuration(holdDurationInMs);
});
}

View File

@ -49,7 +49,7 @@ public:
WUPSButtonCombo_ComboStatus &outStatus);
WUPSButtonCombo_Error UpdateHoldDuration(WUPSButtonCombo_ComboHandle handle,
uint32_t holdDurationInFrames);
uint32_t holdDurationInMs);
WUPSButtonCombo_Error GetButtonComboMeta(WUPSButtonCombo_ComboHandle handle,
WUPSButtonCombo_MetaOptionsOut &outOptions);

View File

@ -132,10 +132,10 @@ namespace ButtonComboUtils::API {
WUPSButtonCombo_Error UpdateHoldDuration(void *identifier,
const WUPSButtonCombo_ComboHandle handle,
const uint32_t holdDurationInFrames) {
const uint32_t holdDurationInMs) {
const auto res = ExecuteForIdentifierLocked(identifier,
[&](ButtonComboManager &manager) {
return manager.UpdateHoldDuration(handle, holdDurationInFrames);
return manager.UpdateHoldDuration(handle, holdDurationInMs);
});
return res;
}

View File

@ -42,7 +42,7 @@ namespace ButtonComboUtils::API {
WUPSButtonCombo_Error UpdateHoldDuration(void *identifier,
WUPSButtonCombo_ComboHandle handle,
uint32_t holdDurationInFrames);
uint32_t holdDurationInMs);
WUPSButtonCombo_Error GetButtonComboMeta(void *identifier,
WUPSButtonCombo_ComboHandle handle,