This commit is contained in:
2024-10-03 19:35:58 +02:00
parent c07fd62037
commit ee721ff573
3 changed files with 8 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ namespace globalInputs
{ {
servicePressedCounter[0]++; servicePressedCounter[0]++;
if (servicePressedCounter[0] == 3000) if (servicePressedCounter[0] >= 3000)
{ {
OnScreenHelp::get()->toggleState(); OnScreenHelp::get()->toggleState();
servicePressedCounter[0] = 0; servicePressedCounter[0] = 0;
@@ -121,7 +121,7 @@ namespace globalInputs
{ {
servicePressedCounter[i + 1]++; servicePressedCounter[i + 1]++;
if (servicePressedCounter[i + 1] == 3000) if (servicePressedCounter[i + 1] >= 3000)
{ {
OnScreenHelp::get()->toggleState(); OnScreenHelp::get()->toggleState();
servicePressedCounter[i + 1] = 0; servicePressedCounter[i + 1] = 0;

View File

@@ -1,5 +1,7 @@
#include <vector>
namespace globalInputs namespace globalInputs
{ {
extern std::vector<int> servicePressedCounter;
// Inicializa variables // Inicializa variables
void init(); void init();

View File

@@ -13,6 +13,7 @@
#include "notify.h" // for Notify #include "notify.h" // for Notify
#include "options.h" // for options #include "options.h" // for options
#include "on_screen_help.h" #include "on_screen_help.h"
#include "global_inputs.h"
#ifndef NO_SHADERS #ifndef NO_SHADERS
#include "jail_shader.h" // for init, render #include "jail_shader.h" // for init, render
@@ -67,7 +68,7 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer) : window(window), ren
fpsCounter = 0; fpsCounter = 0;
fps = 0; fps = 0;
#ifdef DEBUG #ifdef DEBUG
showInfo = false; showInfo = true;
#else #else
showInfo = false; showInfo = false;
#endif #endif
@@ -537,6 +538,8 @@ void Screen::displayInfo()
// Resolution // Resolution
dbg_print(0, 0, infoResolution.c_str(), 255, 255, 0); dbg_print(0, 0, infoResolution.c_str(), 255, 255, 0);
dbg_print(0, 8, std::to_string(globalInputs::servicePressedCounter[0]).c_str(), 255, 255, 0);
} }
} }