Demo: añadido control con mando
This commit is contained in:
7
main.cpp
7
main.cpp
@@ -101,10 +101,10 @@ int main(int argc, char *argv[])
|
|||||||
int numControllers = input->getNumControllers();
|
int numControllers = input->getNumControllers();
|
||||||
if (numControllers > 0)
|
if (numControllers > 0)
|
||||||
{
|
{
|
||||||
controllerName=getControllerName(1);
|
// Obtiene el nombre del primer mando conectado
|
||||||
|
controllerName = input->getControllerName(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Inicializa el texto
|
// Inicializa el texto
|
||||||
Text *text = new Text(asset->get("smb2.txt"), asset->get("smb2.png"), renderer);
|
Text *text = new Text(asset->get("smb2.txt"), asset->get("smb2.png"), renderer);
|
||||||
Text *debugText = new Text(asset->get("debug.txt"), asset->get("debug.png"), renderer);
|
Text *debugText = new Text(asset->get("debug.txt"), asset->get("debug.png"), renderer);
|
||||||
@@ -277,7 +277,8 @@ int main(int argc, char *argv[])
|
|||||||
text->disableZoom();
|
text->disableZoom();
|
||||||
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() * 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});
|
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, inputPressed);
|
debugText->writeCentered(options->screen.nativeWidth / 2, options->screen.nativeHeight / 2, controllerName);
|
||||||
|
debugText->writeCentered(options->screen.nativeWidth / 2, (options->screen.nativeHeight / 2) + debugText->getCharacterSize(), inputPressed);
|
||||||
|
|
||||||
// Vuelca el buffer en pantalla
|
// Vuelca el buffer en pantalla
|
||||||
screen->blit();
|
screen->blit();
|
||||||
|
|||||||
Reference in New Issue
Block a user