Triforce v0.5.0

In-game mods (GameBanana browser, search and installs, with the Mask Salesman), code-patch and cheat mods, the devs' test18 to test45 work (full performance overlay, frame pacing on, steady frame rate, save export and import, bug capture, new options rows, Setup's Mods page and Add to Steam), occlusion queries and new defaults, Auto resolution that scales, replay helper threads and robust buffers off by default, the options in sections.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-17 22:40:50 -06:00
parent 93eeb714c2
commit 6f338c8f56
600 changed files with 116254 additions and 2522 deletions

View File

@@ -21,6 +21,7 @@ static struct {
/* controllers */
void *PadOpen, *PadClose, *PadConnected, *PadsUpdate, *PadButton, *PadAxis, *PadName, *PadRumble;
void *PadType, *PadEffect; /* (optional: HD rumble, host/pad_sdl.c) */
void *PadRumbleTriggers; /* (optional: the motors in an Xbox pad's triggers, host/pad_sdl.c) */
void *PadHasSensor, *PadSensorEnable, *PadSensorData; /* (motion: optional, NULL in an SDL without them) */
void *GetGamepads, *GetGamepadID, *Free; /* (SDL3) */
void *NumJoysticks, *IsGameController, *DeviceInstanceID, *GetJoystick, *JoystickInstanceID; /* (SDL2) */
@@ -67,6 +68,8 @@ static int get_all(HMODULE m, int three) {
/* (SDL2 2.0.12 and 2.0.16 on, SDL3 3.2 on: without them every pad keeps the motor rumble) */
*(FARPROC *)&f.PadType = GetProcAddress(m, three ? "SDL_GetGamepadType" : "SDL_GameControllerGetType");
*(FARPROC *)&f.PadEffect = GetProcAddress(m, three ? "SDL_SendGamepadEffect" : "SDL_GameControllerSendEffect");
/* ((Triforce) the triggers' motors: SDL2 2.0.14 on and every SDL3; without the call they stay still) */
*(FARPROC *)&f.PadRumbleTriggers = GetProcAddress(m, three ? "SDL_RumbleGamepadTriggers" : "SDL_GameControllerRumbleTriggers");
/* (motion sensors: SDL 2.0.14 on and every SDL3; without them the pads still play, with no gyro) */
*(FARPROC *)&f.PadHasSensor = GetProcAddress(m, three ? "SDL_GamepadHasSensor" : "SDL_GameControllerHasSensor");
*(FARPROC *)&f.PadSensorEnable = GetProcAddress(m, three ? "SDL_SetGamepadSensorEnabled" : "SDL_GameControllerSetSensorEnabled");
@@ -599,6 +602,12 @@ void hos_sdl_pad_rumble(void *pad, uint16_t low, uint16_t high, uint32_t ms) {
if (version == 3) CALL(_Bool (*)(void *, uint16_t, uint16_t, uint32_t), PadRumble)(pad, low, high, ms);
else CALL(int (*)(void *, uint16_t, uint16_t, uint32_t), PadRumble)(pad, low, high, ms);
}
int hos_sdl_pad_has_trigger_rumble(void) { return f.PadRumbleTriggers != NULL; }
int hos_sdl_pad_rumble_triggers(void *pad, uint16_t left, uint16_t right, uint32_t ms) {
if (!f.PadRumbleTriggers) return 0;
if (version == 3) return CALL(_Bool (*)(void *, uint16_t, uint16_t, uint32_t), PadRumbleTriggers)(pad, left, right, ms);
return CALL(int (*)(void *, uint16_t, uint16_t, uint32_t), PadRumbleTriggers)(pad, left, right, ms) == 0;
}
int hos_sdl_pad_type(void *pad) { return f.PadType ? CALL(int (*)(void *), PadType)(pad) : 0; }
int hos_sdl_pad_has_effect(void) { return f.PadEffect != NULL; }
int hos_sdl_pad_effect(void *pad, const void *data, int size) {