From 82b2b8bf578feba41b4f7087fe9ea3b75a3fe340 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Tue, 23 May 2023 18:10:22 +0200 Subject: [PATCH] =?UTF-8?q?input:=20el=20nombre=20de=20los=20mandos=20ya?= =?UTF-8?q?=20no=20se=20redimensiona=20ni=20se=20a=C3=B1ade=20el=20=C3=ADn?= =?UTF-8?q?dice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 4 ++-- units/input.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index caadc3b..0c3ff70 100644 --- a/main.cpp +++ b/main.cpp @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) input->bindKey(INPUT_DOWN, SDL_SCANCODE_DOWN); input->bindKey(INPUT_LEFT, SDL_SCANCODE_LEFT); input->bindKey(INPUT_RIGHT, SDL_SCANCODE_RIGHT); - string controllerName = ""; + string controllerName = "htfvhfhk"; int numControllers = input->getNumControllers(); if (numControllers > 0) { @@ -278,7 +278,7 @@ int main(int argc, char *argv[]) text->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 7, "Pulsa 'N' para mostrar", 1, {240, 240, 240}, 1, {0, 0, 192}); text->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 8, "una notificacion", 1, {240, 240, 240}, 1, {0, 0, 192}); debugText->writeCentered(options->screen.nativeWidth / 2, options->screen.nativeHeight / 2, controllerName); - debugText->writeCentered(options->screen.nativeWidth / 2, (options->screen.nativeHeight / 2) + debugText->getCharacterSize(), inputPressed); + debugText->writeCentered(options->screen.nativeWidth / 2, (options->screen.nativeHeight / 2) + (debugText->getCharacterSize()*2), inputPressed); // Vuelca el buffer en pantalla screen->blit(); diff --git a/units/input.cpp b/units/input.cpp index c423644..d3fd456 100644 --- a/units/input.cpp +++ b/units/input.cpp @@ -236,11 +236,11 @@ bool Input::discoverGameController() connectedControllers.push_back(pad); const string separator(" #"); string name = SDL_GameControllerNameForIndex(i); - name.resize(25); - name = name + separator + to_string(i); + //name.resize(25); + //name = name + separator + to_string(i); if (verbose) { - cout << name << endl; + cout << " -" << name << endl; } controllerNames.push_back(name); }