Implement SDL present functions

This commit is contained in:
Magnus Norddahl 2019-12-05 21:26:01 +01:00
commit e4bd2483e5
4 changed files with 142 additions and 12 deletions

View file

@ -8,6 +8,8 @@
#include "g_game.h"
#include "gamedata/fonts/v_text.h"
#include "rendering/i_video.h"
#include "hwrenderer/utility/hw_clock.h"
#include "hwrenderer/utility/hw_vrmodes.h"
#include "hwrenderer/utility/hw_cvars.h"
@ -47,18 +49,6 @@ extern bool gpuStatActive;
extern bool keepGpuStatActive;
extern FString gpuStatOutput;
#ifdef WIN32
void I_PolyPresentInit();
uint8_t *I_PolyPresentLock(int w, int h, bool vsync, int &pitch);
void I_PolyPresentUnlock(int x, int y, int w, int h);
void I_PolyPresentDeinit();
#else
void I_PolyPresentInit() { }
uint8_t *I_PolyPresentLock(int w, int h, bool vsync, int &pitch) { pitch = 0; return nullptr; }
void I_PolyPresentUnlock(int x, int y, int w, int h) { }
void I_PolyPresentDeinit() { }
#endif
PolyFrameBuffer::PolyFrameBuffer(void *hMonitor, bool fullscreen) : Super(hMonitor, fullscreen)
{
I_PolyPresentInit();