diff --git a/source/global_inputs.cpp b/source/global_inputs.cpp index 3958fd4..0dfce60 100644 --- a/source/global_inputs.cpp +++ b/source/global_inputs.cpp @@ -82,7 +82,7 @@ namespace globalInputs { servicePressedCounter[0]++; - if (servicePressedCounter[0] == 3000) + if (servicePressedCounter[0] >= 3000) { OnScreenHelp::get()->toggleState(); servicePressedCounter[0] = 0; @@ -121,7 +121,7 @@ namespace globalInputs { servicePressedCounter[i + 1]++; - if (servicePressedCounter[i + 1] == 3000) + if (servicePressedCounter[i + 1] >= 3000) { OnScreenHelp::get()->toggleState(); servicePressedCounter[i + 1] = 0; diff --git a/source/global_inputs.h b/source/global_inputs.h index f905641..9275630 100644 --- a/source/global_inputs.h +++ b/source/global_inputs.h @@ -1,5 +1,7 @@ +#include namespace globalInputs { +extern std::vector servicePressedCounter; // Inicializa variables void init(); diff --git a/source/screen.cpp b/source/screen.cpp index cda6272..d883189 100644 --- a/source/screen.cpp +++ b/source/screen.cpp @@ -13,6 +13,7 @@ #include "notify.h" // for Notify #include "options.h" // for options #include "on_screen_help.h" +#include "global_inputs.h" #ifndef NO_SHADERS #include "jail_shader.h" // for init, render @@ -67,7 +68,7 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer) : window(window), ren fpsCounter = 0; fps = 0; #ifdef DEBUG - showInfo = false; + showInfo = true; #else showInfo = false; #endif @@ -537,6 +538,8 @@ void Screen::displayInfo() // Resolution 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); } }