[ion/simulator] Don't enable the framebuffer in headless mode

A quick test on a state file with 64k events took 2.5 seconds to process
with the framebuffer vs 1.9 without.
This commit is contained in:
Romain Goyet
2020-09-17 21:31:23 -04:00
committed by Léa Saviot
parent 543d3d540e
commit 699cf22023
2 changed files with 2 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ namespace Display {
static SDL_Texture * sFramebufferTexture = nullptr;
void init(SDL_Renderer * renderer) {
Framebuffer::setActive(true);
Uint32 texturePixelFormat = SDL_PIXELFORMAT_RGB565;
assert(sizeof(KDColor) == SDL_BYTESPERPIXEL(texturePixelFormat));
sFramebufferTexture = SDL_CreateTexture(

View File

@@ -14,7 +14,7 @@
* framebuffer to a PNG file. */
static KDColor sPixels[Ion::Display::Width * Ion::Display::Height];
static bool sFrameBufferActive = true;
static bool sFrameBufferActive = false;
namespace Ion {
namespace Display {