Retoques de lo anterior para ser un poco mas eficiente y ordenado
This commit is contained in:
@@ -43,6 +43,10 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, Input *
|
||||
#else
|
||||
showFps = false;
|
||||
#endif
|
||||
SDL_DisplayMode DM;
|
||||
SDL_GetCurrentDisplayMode(0, &DM);
|
||||
displayWidth = DM.w;
|
||||
displayHeight = DM.h;
|
||||
|
||||
// Crea los objetos
|
||||
notify = new Notify(renderer, asset->get("notify.png"), asset->get("8bithud.png"), asset->get("8bithud.txt"), asset->get("notify.wav"), options);
|
||||
@@ -103,9 +107,7 @@ void Screen::blit()
|
||||
dbg_print(0, 0, fpstext.c_str(), 255, 255, 255);
|
||||
|
||||
// Resolution
|
||||
SDL_DisplayMode DM;
|
||||
SDL_GetCurrentDisplayMode(0, &DM);
|
||||
const std::string resolution = std::to_string(DM.w) + " X " + std::to_string(DM.h);
|
||||
const std::string resolution = std::to_string(displayWidth) + " X " + std::to_string(displayHeight);
|
||||
dbg_print(0, 8, resolution.c_str(), 255, 255, 255);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user