mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-09-25 13:27:12 +03:00
Update to SDL3 (#1283)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user