Update to SDL3 (#1283)

This commit is contained in:
Gustavo Ribeiro Croscato
2026-08-22 12:09:53 -04:00
committed by GitHub
parent 75ceaec54e
commit a8cc0ec12a
68 changed files with 786 additions and 704 deletions
+9 -6
View File
@@ -25,13 +25,14 @@
#include "Script.h"
#include "UtilityClass.h"
#include "Vlogging.h"
#include "Alloc.h"
static void updatebuttonmappings(int bind)
{
for (
SDL_GameControllerButton i = SDL_CONTROLLER_BUTTON_A;
i < SDL_CONTROLLER_BUTTON_DPAD_UP;
i = (SDL_GameControllerButton) (i + 1)
SDL_GamepadButton i = SDL_GAMEPAD_BUTTON_SOUTH;
i < SDL_GAMEPAD_BUTTON_DPAD_UP;
i = (SDL_GamepadButton) (i + 1)
) {
if (key.isDown(i))
{
@@ -41,7 +42,7 @@ static void updatebuttonmappings(int bind)
game.gpmenu_lastbutton = i;
// Is this button already in the list for this action?
std::vector<SDL_GameControllerButton>* vec = NULL;
std::vector<SDL_GamepadButton>* vec = NULL;
switch (bind)
{
case 1: vec = &game.controllerButton_flip; break;
@@ -1407,7 +1408,9 @@ static void menuactionpress(void)
else if (game.currentmenuoption == (int)game.menuoptions.size()-2)
{
// play the cutscene, from clipboard
game.cutscenetest_menu_play_id = std::string(SDL_GetClipboardText());
char *cutscene = SDL_GetClipboardText();
game.cutscenetest_menu_play_id = std::string(cutscene);
VVV_free(cutscene);
startmode(Start_CUTSCENETEST);
}
else if (game.currentmenuoption == (int)game.menuoptions.size()-1)
@@ -3045,7 +3048,7 @@ void gameinput(void)
game.menupage = 30; // Pause screen
}
if (game.deathseq == -1 && (key.isDown(SDLK_r) || key.isDown(game.controllerButton_restart)) && !game.nodeathmode)// && map.custommode) //Have fun glitchrunners!
if (game.deathseq == -1 && (key.isDown(SDLK_R) || key.isDown(game.controllerButton_restart)) && !game.nodeathmode)// && map.custommode) //Have fun glitchrunners!
{
game.deathseq = 30;
}