AppleWin/source/linux/videobuffer.cpp
Andrea Odetti 861c87efd4 Remove pointless getScreenData() and shed some nanoseconds from screen repaint.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2020-11-30 13:38:56 +00:00

23 lines
539 B
C++

#include "linux/videobuffer.h"
#include "StdAfx.h"
#include "Video.h"
#include "Frame.h"
#include "NTSC.h"
void VideoBufferInitialize()
{
static_assert(sizeof(bgra_t) == 4, "Invalid size of bgra_t");
VideoResetState();
const int numberOfPixels = GetFrameBufferWidth() * GetFrameBufferHeight();
g_pFramebufferbits = static_cast<uint8_t *>(calloc(sizeof(bgra_t), numberOfPixels));
NTSC_VideoInit(g_pFramebufferbits);
}
void VideoBufferDestroy()
{
free(g_pFramebufferbits);
g_pFramebufferbits = nullptr;
NTSC_Destroy();
}