add support for writing to VCount. incl. fucked-up display and altering framerate accordingly.

This commit is contained in:
StapleButter
2017-05-10 02:21:02 +02:00
parent 63e15d2480
commit f54f54fb7e
6 changed files with 72 additions and 36 deletions

View File

@ -386,7 +386,7 @@ wxThread::ExitCode EmuThread::Entry()
if (emustatus == 1)
{
NDS::RunFrame();
u32 nlines = NDS::RunFrame();
SDL_LockTexture(sdltex, NULL, &texpixels, &texstride);
if (texstride == 256*4)
@ -410,7 +410,9 @@ wxThread::ExitCode EmuThread::Entry()
SDL_RenderPresent(sdlrend);
// framerate limiter based off SDL2_gfx
float framerate = 1000.0f / 60.0f;
float framerate;
if (nlines == 263) framerate = 1000.0f / 60.0f;
else framerate = 1000.0f / ((60.0f * nlines) / 263.0f);
fpslimitcount++;
u32 curtick = SDL_GetTicks();