added enable/disable vsync

This commit is contained in:
Sandro Sobczyński
2020-11-04 16:03:53 +01:00
parent aa6b2d314b
commit ef16f1dbe2
4 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -37,6 +37,7 @@ Renderer::Renderer(u32 t_packetSize, ScreenSettings *t_screen)
dma_channel_fast_waits(DMA_CHANNEL_GIF);
context = 0;
isTextureVRAMAllocated = false;
isVSyncEnabled = true;
isFrameEmpty = false;
lastTextureId = 0;
flipPacket = packet_init(3, PACKET_UCAB); // Uncached accelerated
@@ -264,7 +265,7 @@ void Renderer::endFrame(float fps)
{
if (!isFrameEmpty)
{
if (fps > 49.0F)
if (fps > 49.0F && isVSyncEnabled)
graph_wait_vsync();
flipBuffers();
}